douwei7471 2014-10-29 16:58
浏览 14
已采纳

为大型网站设计数据库的方法? [关闭]

While making a website like facebook

we can follow two approach of database design so please suggest better Concern is Data Secuirty and Backup Management

Approach 1 Design a table that will hold all the data of the personal and some other table that will hold other keys like image etc the problem will come when there are 10 lakhs of entries in the table is it possible thereafter to take backup some hosting company wont allow to do so.

Approach 2 While the user signup assign the separate table to the users in that way user will reach to ten thousand rows in 5 years or so just a assumption

but that means million tables in the database if million user signup and that again a problem i believe

Please suggest better way if anyone can

  • 写回答

1条回答 默认 最新

  • dongxing1853 2014-10-29 17:04
    关注

    Sites the size of Facebook have unique challenges specific to their setups. Facebook, Twitter, Google, etc. all maintain their own forks of database engines and often even write their own, and they'll be using different databases for different purposes. Very little of what they do is going to be applicable to anything you build.

    Approach #1 is by far the better. With proper indexes and a good database design, MySQL can support billions of rows. It cannot as easily support millions of tables.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制