Should I use a single or multiple database setup for a multi-client application?

前端 未结 10 740
囚心锁ツ
囚心锁ツ 2020-11-30 17:50

I am working on a PHP application that intends to ease company workflow and project management, let\'s say something like Basecamp and GoPlan.

I am not sure on what

10条回答
  •  Happy的楠姐
    2020-11-30 18:18

    • DEVELOPMENT For rapid development, use a database per customer. Think how easy it will be to backup, restore, or delete a customer's data. Or to measure/monitor/bill usage. You won't need to write code to do it by yourself, just use your database primitives.

    • PERFORMANCE For performance, use a database for all. Think about connection pooling, shared memory, caching, etc.

    • BUSINESS If your business plan is to have lots of small customers (think hotmail) you should probably work on a single DB. And have all administrative tasks such registration, deletion, data migration, etc. fully automated and exposed in a friendly interface. If you plan to have dozens or up to a few hundreds of big customers then you can work in one DB per customer and have system administration scripts in place that can be operated by your customer support staff.

提交回复
热议问题