Posted on: 7/24/2012 11:51:49 PM | Views : 263

Hello everyone, I have thought about this back and forth and not sure if I have done this correctly. So please give me some advice. I have four tables - user, product, sale, feedback. So here is how it works: a user can own many products (one to many relationship), a product can be listed and sold many times (one product to many sales relationship) and one sale can have only one feedback (one to one). Here is the problem.
Because sale and feedback has one to one relationship, I can include the feedback column in sale table, but since feedback is optional for user to place it, I will have a lot of null in the feedback column, which I think it is not a good design. What I am doing now is to create a feedback table and create foreign key saleID column in it and link this column to sale table. Am I doing it correctly? Is there a way to improve this? Your advice is appreciated. 

Thanks.

regards;
...

Go to the complete details ...