联系人数据库 [英] Contacts Database
问题描述
创建一个 - 与联系人表的许多关系。该表将有2列:contact-id和friend-id。
两列都是该表的主键。
everybody. I want to develop online contacts book for mobile phones. But I have the problem with database management. For example I have user, he/she has username, password, email, phone number, etc... Also this user has contacts whom he/she accepted as friends. How can I store contacts for each user effectively? I think I can create new table for each new user but it is not effective. Can anyone suggest anything, or give any link, resource about this problem?
Create a "friends" table with many-to-many relationship with the "contacts" table. That table will have 2 columns: "contact-id" and "friend-id". Both columns together are the primary key of that table.
这篇关于联系人数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!