Poll Database Schema

旧城冷巷雨未停 提交于 2019-12-02 18:08:33
cherouvim

The schema looks good, and yes, you'd need to track the user votes as well.

Note: the "votes" column of the poll_answers table isn't necessary. Votes can be determined by querying the Poll_voting_history table.

I think that question_id in poll_voting_history is not necessary as well, since each answer points to a question, so based on a answer_id you can get the question_id that it belongs to.

I would like to add the status of poll_questions and poll_answers as well, just in case if we need to activate or disable the current poll question during given date and time.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!