doumu1873 2018-09-28 09:42
浏览 33
已采纳

为每个商家分配在线库存系统的数据库是否合适? [关闭]

For example, Company Abc will have it's own database: Database_Abc.

Let's say each Database will consist of the following tables:

  1. staffs
  2. products
  3. inventory
  4. logs

or

one centralized database with unique merchant id would be better?

  1. staffs - merchant_id
  2. products - merchant_id
  3. inventory - merchant_id
  4. logs - merchant_id

which method is good for scalability?

  • 写回答

2条回答 默认 最新

  • duandu8707 2018-09-28 10:41
    关注

    Well, it's not just a question about database management but also a server-side applications thoughts.

    1. Starting from a scratch one centralized DB with uniform server-side application will do the trick nicely and in case of horizontal increase of data will scale almost perfectly

    2. If you have various and very different requests per each company you'll need to think about implementation for each company with it's own design. Such approach consumes more resources but will fit individual customers

    Speaking of database management you'll need to ask yourself following questions

    1. What type of data will be stored? You should keep in mind that storing financial data best fits for DECIMAL type for example.
    2. Think about relations between tables - thus think about correct FOREIGN KEYs for example.
    3. Think about possible shortcomings of MySQL itself - for example, it's not suited well for full-text search
    4. How your data will increase in size? If it will increase very rapidly, you will need to think about PARTITIONING for example
    5. Think about replication and backup issues.
    6. Where will you host your database? You can think about cloud services thus not thinking about administration etc.
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥30 VMware 云桌面水印如何添加
  • ¥15 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题
  • ¥30 酬劳2w元求合作写文章
  • ¥15 在现有系统基础上增加功能
  • ¥15 远程桌面文档内容复制粘贴,格式会变化
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”