In my opinion, this will depend on your likely customer base. If you could get into a situation where arch-rivals use your system, then you will be better off with separate databases. It also depends on how your databases are implemented by multiple databases. If each database has a separate copy of the infrastructure, then this assumes a single database (or a change in the DBMS). If several databases can be served by one copy of the infrastructure, I would go to separate databases.
Consider backing up a database. Client A says: "Please send me a copy of my data." Much easier to set up a database separately than when sharing a single database. Consider uninstalling a client; again, much easier with separate databases.
(The “infrastructure” part is muddy because there are significant differences between different DBMSs regarding what constitutes a “database” compared to a “server instance.” Add: the question is marked as “mysql”, so maybe these thoughts are not quite relevant.)
Add: Another problem - with multiple clients in the same database, each SQL query will have to provide data selection for the right client. This means that SQL will be more difficult to write and read, and the DBMS will have to work more on data processing, and the indexes will be more, and ... I really will go with a separate database for each client for many purposes.
Obviously, StackOverflow (as an example) does not have a separate database for each user; we all use the same database. But if you use accounting systems for different companies, I don’t think it would be acceptable (for companies and, possibly, not for legal entities) to share databases.
Jonathan Leffler Nov 01 '08 at 15:58 2008-11-01 15:58
source share