简体   繁体   English

如何在数据库中存储大列表?

[英]How to store a large list in a database?

I'm starting a project and unsure of the proper way to do this so I just need to be pointed in a general direction. 我正在开始一个项目,不确定执行此操作的正确方法,因此只需要指出一个总体方向即可。

Essentially, each user stored in the database will have a large list of people (millions) that they want to connect with, and a large list of people they have connected with. 从本质上讲,存储在数据库中的每个用户将拥有他们想要与之联系的一大群人(百万),以及他们与之联系的一大群人。 The lists of people to connect with will be updated weekly, possibly monthly and duplicates will need to be checked for. 与之联系的人员列表将每周(可能每月)更新,并且需要检查重复项。

*It might be important to note that the lists of people to connect with won't be users in the system. *可能需要注意的是,要联系的人员列表不会是系统中的用户。

Should each list for each user be stored in separate tables and linked to or is there a more efficient structure for this? 是否应该将每个用户的每个列表存储在单独的表中并链接到该表,或者是否有更有效的结构?

Thanks! 谢谢!

One way would be 一种方法是

users table
-----------
user_id
user_name
...


lists table
-----------
list_id
user_id
list_name
...


list_persons table
----------------
list_id
person_name
...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM