最佳邀请数据模型?
我正在尝试确定为网站实施邀请流程的最佳数据模型,这将减少开销,但也有意义。
我的模型将有一个 InvitationResponses 查找表,用于存储 ResponseID 和“接受”、“可能是”、“拒绝”等描述。另外,我希望能够包含对“可能是”或“拒绝”响应的用户解释。
因此,我试图决定是否应该保留 ResponseID 作为邀请表的一部分,或者有一个单独的表,如下所示:
InvitationsResponses
身份证号
邀请ID
响应ID
评论
I am trying to decide on the best data model to implement Invitation process for a website, that will reduce overhead but also would make sense.
My model will have an InvitationResponses look-up table that will store ResponseID and descriptions like "Accept", "May Be", "Reject". Also, I want to have ability to include user explanation for "May Be" or "Reject" responses.
Therefore, I am trying to decide if I should keep a ResponseID as part of the Invitations table, or have a separate table that will be something like this:
InvitationsResponses
ID
InvitationID
ResponseID
Comment
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会将其全部保存在一张表中,为每个事件设置一个状态标记,具体取决于它是否被接受、拒绝等...使用一张表比使用两张表获得更好的性能,特别是对于像您所要做的这样简单的事情问。
I would keep it all in one table, have a status marker for each event depending on whether it's accepted, rejected, etc... You'll gain better performance with one table than two, especially for something as simple as what you're asking.