1

I'm building a multi tenant application, each client can access the application and store that data, the question now is wheter to use one single database for all clients or create a database for each client?

Whats the best approach in this situation

Comments
  • 3
    One database.

    I see no benefits in having many databases.
    It would be hell trying to make changes or updates and sync them to multiple databases.
  • 2
    A certain sort of client would be comforted by having their data in a separate DB. I'd be tempted to offer it as an optional extra.

    If you automate the schema migrations then you can handle N databases as easily as 1. If you don't, then it'll bite you in the arse even if there's only 1.
  • 1
    @Lensflare if 10 clients have 1000 entries each in the same database wouldn't a query create an overhead?
  • 2
    @dIREsTRAITS databases can handle that kind of stuff pretty well. They are built for that.
    If the data structure for each client is the same, having it in different databases or tables would be pointless, imo.
  • 0
    Hmmm retoor was doing an experiment like that a while ago it seemed to be a success, but it is more to manage - so the question becomes, can you do a cost benefit analysis and weigh it against the time to implement?
Add Comment