gnuffo1 Posted March 17, 2006 Share Posted March 17, 2006 The website in planning will have a system for rating and writing reviews on products. Since there will be a lot users that will leave the review field blank, which of these designs is the best:1. Have two seperate review and ratings tables and when a user does fill out both a one to one relationship between the two records is established. That way records in the review table (or even the rating table is user only write reviews and don't rate) will only be created when there is actually a review.2. Have one table that contains a review field and the ratings fields. This version will have a lot of NULL (empty) fields, but should be quicker.Note that the ratings and the reviews are both for the product, the ratings are not ratings of the review or vice versa. Quote Link to comment Share on other sites More sharing options...
fenway Posted March 17, 2006 Share Posted March 17, 2006 I think you should go with the former -- if you ever need to store more than a single field about the rating (which you will), then it makes sense to have a separate table. Of course, the FK would be in the ratings table pointing back to the review, not vice versa, or you'd end up with the same problem.Hope that helps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.