6

请问存储百万条或者千万条抖音评论应该选用什么数据库?怎么设计?

 3 years ago
source link: https://www.v2ex.com/t/781032
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  程序员

请问存储百万条或者千万条抖音评论应该选用什么数据库?怎么设计?

  iiq2000 · 7 小时 17 分钟前 · 2594 次点击
每个抖音作者都会有数条视频,而每条视频下又会有数条评论。估计会有数百个抖音作者,千万条评论,读写会比较频繁,可能会日增几万条或者十万条数据,老板想把这些评论信息都存到数据库(评论者抖音号、评论内容,评论时间,对应的视频 id )。

我目前想到的是存到 MongoDB,每一个作者抖音号是一个集合名字,集合里就是这个作者下所有视频的评论(每条评论里会包含对应的视频 id );

同事建议用关系型数据库,把表分细一点,然后设置外键,查询的时候联合查询,如果数据量大的话,哪种方式会更好一些呢?是应该选用关系型数据库还是非关系型呢?烦请赐教。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK