I want to store the list of users who have 开发者_JAVA百科voted on an article.
Also want to avoid same user from re-voting again.
What I have now is just use article_id to reference this way,
VOTING : article_id | user_id
ARTICLE : article_id | article_text | rating
Is there a more efficient way to do this?
The database is right the only thing is that the TABLE VOTING should have the pair (article_id | user_id) as unique.
In that way will be impossible to vote twice the same article to the user.
精彩评论