I am planning to implement an product offering SaaS, while planning for architecture our team came across whether to use single database for all customers or using separate database for each customer?
Can anyone tell me what are pros and cons of using multiple database? (performance, table caching, etc..)
The pros of individual DBs are that you can tune the individual DBs to customer needs. Put the high demand customers on their own machines, bundle low demand on a single machine, etc.
The primary value of a single db is having a single view of all of the data, if that’s important to you (statistics, the application, whatever). Most DBs don’t give you the option of specifying “hot” parts of a table for caching and whatever, but you can do that for individual tables.
The amount of overhead that each individual DB has within a server I think is minimal. If your clients are not sharing any data, then an individual DB may well be a good plan.