1
votes

Multi-Tenant Data Architecture

  1. Separate Databases : Supported by Hibernate 4.0.
  2. Shared Database, Separate Schemas : Supported by Hibernate 4.0.
  3. Shared Database, Shared Schema : Planned for Hibernate 5.0 (DISCRIMINATOR).

However, (unlike Oracle or PostGre) MySQL doesn’t seem to have concept of schemas?, and so if I am using Hibernate + MySQL to achieve multitenancy, is it true that the only choice I am left over with is Separate Database?

2
Hey there, have you found any solution to this ? - Bilbo Baggins

2 Answers

0
votes

I do not think so. You can create multiple schemas in a single data base in mysql. So you can go with multiple schemas

0
votes

You Can use : The Hibernate 4.0 ConnectionProvider for the same you could switch over the appropriate tenant databases on a data base call when your session is trying to make a Connection to a datasource.

Please check with MultiTenantConnectionIdentifier and MultiTenantConnectionProvider availabled in Hibernate 4.0

For more help you can contact at : [email protected]