I m building a Wine review site and have run into a database design problem I was hoping someone could help me with.
The basic premise of the site is that users will log in a leave reviews of wines they have tested.
- users
- wines
- reviews
A user has many reviews, review belongs to user and review belongs to wine. This much is easy.
I have two extra bits of information I want to show.
Each week I will have a list of the top 10 wines bought in supermarkets. This list is not based on data from the site but rather data given to me by the supermarket so I cannot calculate this myself and display.
I will also have featured wines which will be displayed on the front page. Again supplied by the supermarket.
My question is what kind of database design would be best in this situation, in terms of avoiding duplication and complexity.
For the top 10 list my initial thought is to add a decimal column to the wines table which will list its position in the top 10 list but this seems overkill for thousands of wines when only 10 are listed at once.
I m thinking the same for featured wines, adding a boolean value to indicate if the wine is a featured wine or not. Again, it seems overkill and I don t want to maintenance problem of making sure only a certain number of wines are featured (as this will change week to week)
Thanks.