We are building a multi-tenant application. Through the admin interface, we will add new tenant as and when required. This application needs to work with 1+n database.
1 Main DB with about 5 tables. n DBs for each tenant that we create. The tenant specific database may reside on the separate db server altogether.
Question:
- What is the best way to achieve this ?
- Where do we store the the db connection information for each tenant ?
- Sometime, we may have to fire join queries on tables in tenant and main db. How would this work?
Thanks in advance for reading and any possible solution please.