民意调查数据库架构
我想创建一个民意调查系统,可以在我的网站上提供很多答案,但我在想最好的方法是什么。我不太专业。
我正在考虑这个模式:
polls
-------------------------------------
id | question | start_time | end_time
poll_answers
---------------------
id | poll_id | answer
poll_votes
--------------------------
id | poll_answer | user_id
你觉得怎么样?
谢谢
I wanna create a poll system with possibilty to have many answers on my website but im thinking whats the best way. Im not so pro.
Im thinking this schema:
polls
-------------------------------------
id | question | start_time | end_time
poll_answers
---------------------
id | poll_id | answer
poll_votes
--------------------------
id | poll_answer | user_id
What do you think?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来不错。但是,如果您希望将来能够进行多问题民意调查,您可以考虑使用额外的问题表。
Looks good. However you may consider an additional question table if you might want the possibility to have multi-question polls in the future.