Soldato
- Joined
- 17 Oct 2002
- Posts
- 3,101
I'm working on some code for a project but I can't decide which is 'better'.
It's for a system where a user adds some data to the database (in this case it's video games) but the data has to be approved by a percentage of the users before it goes into circulation on the website. currently I have:
games
id
game_name
...
approval_rating
users_games_approvals
user_id
game_id
When a user approves a game it simply does approval_rating++ until it reaches the approval threshold and it'll stop appearing on the "games awaiting approval" page. If the click disapprove then it does approval_rating-- until it drops below the deletion threshold and gets removed.
Would it better to do it this way OR would it be better to have a 'games_awaiting_approval' table that is completely separate to the normal games table?
I guess there isn't really a definitive answer but if anyone has any suggestions or comments then they are most welcome.
It's for a system where a user adds some data to the database (in this case it's video games) but the data has to be approved by a percentage of the users before it goes into circulation on the website. currently I have:
games
id
game_name
...
approval_rating
users_games_approvals
user_id
game_id
When a user approves a game it simply does approval_rating++ until it reaches the approval threshold and it'll stop appearing on the "games awaiting approval" page. If the click disapprove then it does approval_rating-- until it drops below the deletion threshold and gets removed.
Would it better to do it this way OR would it be better to have a 'games_awaiting_approval' table that is completely separate to the normal games table?
I guess there isn't really a definitive answer but if anyone has any suggestions or comments then they are most welcome.