开发者

Store list of users who have voted and stop re-voting

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜