帮助设计邀请页面的流程
我正在实现一个邀请页面,用户可以在其中登录他们的电子邮件帐户并从地址簿导入联系人。我的问题与数据库设计有关。我想存储每个邀请用户的所有电子邮件,以便在后续访问邀请时,他们不必登录。这也将允许我提供朋友推荐等。
我正在考虑创建一个新表称为联系人,字段为 userid、contantname、contactemail。我意识到许多用户可能有相同的联系人,所以我想知道将 contactname 和 contactemail 存储在单独的表中是否是好的数据库设计,或者在这种情况下将它们保留在同一个表中是否可以。
我也很想知道其他人如何构建整个邀请流程。例如,在我的系统中,对于系统中已存在的每个联系人,我将提示用户关注,如果该联系人不在系统中,我将提示用户邀请他们。当受邀用户注册时,该用户和受邀用户将自动相互关注,并且该条目将从联系人数据库中删除。如果联系人存在多个用户,一旦该联系人接受一位用户的邀请,我将显示其他用户作为后续推荐。这听起来不错,还是有更好的方法?
谢谢。
I'm implementing an invite page where users can log onto their email account and import contacts from their address book. My question is relating to the database design for this. I want to store all the emails for each user that invites, so that on subsequent visits to the invite, they won't have to log in. This will also allow me to give friend recommendations etc.
I was thinking of creating a new table called contacts with the fields userid, contantname, contactemail. I realize that many users may have the same contact, so I'm wondering if it's good db design to store the contactname and contactemail on a separate table, or if it's okay in this case to keep them in the same table.
I'm also curious to know how others have architected the whole invite flow. IN mine for example, for each contact that already exists in the system, I'll prompt the user to follow, and if the contact is not in system, I'll prompt the user to invite them. When the invited user signs up, the user and invited user will automatically follow each other, and the entry will get deleted from the contacts db. In the case where the contact exists for multiple users, once that contact accepts the invitation from one user, I'll display the other users as recommendations for following. Does this sound okay, or is there a better approach to this?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的域中,“联系人姓名”在功能上依赖于什么属性或属性集?是在 userid 还是 contactemail 上?
回答这个问题,你就回答了你的问题。我有以下场景供您考虑:
假设有一个联系电子邮件: [email protected]
在我的地址簿中,她的联系人姓名是“Jane Doe”。
在 John Doe 的地址簿中,它是“Stupid Kid Sister”
。在 Jane Doe 的电子邮件服务中,它是“Jane Mary Doe”。
如果你在我或约翰·多伊邀请简之前就已经了解了“简·玛丽·多伊”,那么你就有了答案; contactname 在功能上依赖于 contactemail。如果你不这样做,你就有了答案:我永远不适合通过某些路径依赖事件来看到或发送给简的邀请电子邮件来解决“愚蠢的孩子姐姐”; contactname 在功能上依赖于 userid 和 contactemail。
What attribute or set of attributes is "contact name" functionally dependent upon in your domain? Is it on userid or contactemail?
Answer that and you answer your question. I have the following scenario for you to consider:
Let's say there's a contactemail: [email protected]
In my address book, her contact name is "Jane Doe"
In John Doe's address book, it's "Stupid Kid Sister"
In Jane Doe's email service, it's "Jane Mary Doe".
If you already have knowlege of "Jane Mary Doe" before I or John Doe invite Jane, then you have your answer; contactname is functionally dependent on contactemail. If you don't, you have your answer: it would never be appropriate for me to see, or my invite email to Jane, through some path dependent event, to address "Stupid Kid Sister"; contactname is functionally dependent on userid and contactemail.