社交网站的数据库设计 [英] Database design for a social networking site

查看:98
本文介绍了社交网站的数据库设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

社交网站(例如:Twitter)中将显示哪些表格.

What are the Tables that would be present in a social networking site (ex: Twitter).

到目前为止,我有一个用户表.如何跟踪关注者和我关注的人?

I have a users table as of now. How to keep track of followers and people I do follow?

  • 我应该为追随者和追随者单独维护一张桌子吗?
  • 这些表中会有哪些列?

请不要认为这是主观/非主题.当我是初学者时,我以为专家可以指导我获得良好的数据库设计?

Please don't think this as Subjective/Off topic. As I am a beginner, I thought experts can guide me to get a good DB design?

推荐答案

尝试看看数据库答案,尤其是数据模型.它们针对各种系统具有几种不同的设计.此一个适用于社交网站,它可以使您了解所需的内容.

Try having a look at Database Answers in particular the data models. They have several different designs for various systems. This one is for a social networking site which may give you an idea of what's required.

您可能想在SO上搜索其他社交网络数据库问题.我发现了,其中有一个指向

You may want to search on SO for other social network database questions. I found this one that had a link to flickr showing a schema which appears to be from Facebook.

您的数据库设计将基于您的系统要求.如果不确切知道您要实现的目标,则很难为您提供最佳设计.

Your database design will be based around your system requirements. Without knowing exactly what you are trying to achieve, it is difficult to give you the best design.

这篇关于社交网站的数据库设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆