We have developed a small ERP application and the architecture right now is a 1-1 deployment/codebase for each client.
We are now trying to convert it to a SaaS solution and we have the following approaches possible
Separate DB for each client
- Easier conversion of the existing applications
- Data is isolated
- Harder to maintain and update as we grow
Single DB for all clients with client ID in all tables
- Easier to update
- Possible data leaks(?)
- Huge database
What's the best practice? For reference we are using Symfony2 with MySQL.