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

前端 未结 10 741
囚心锁ツ
囚心锁ツ 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条回答
  •  旧巷少年郎
    2020-11-30 18:08

    I usually add ClientID to all tables and go with one database. But since the database is usually hard to scale I will also make it possible to run on different database instances for some or all clients.

    That way you can have a bunch of small clients in one database and the big ones on separate servers.

    A key factor for maintainability though, is that you keep the schema identical in all databases. There will be headache enough to manage the versioning without introducing client specific schemas.

提交回复
热议问题