Patent ID: 8200628

Claim:
A method of storing and accessing multi-tenancy data, the method comprising the steps of: creating a plurality of table sets in one or more databases, wherein each table set is used to store data of a group of tenants selected from a plurality of tenants; accessing data of a tenant in a table set in response to receiving a data access request from the tenant; recording relationships between the tenants and the table sets in a multi-tenancy metadata repository, wherein the step of accessing the data of the tenant comprises the steps of finding the table set by querying the metadata repository and accessing the data of the tenant in the table set based on the result received from the query of the metadata repository; and determining a maximum number of table sets and a maximum table sharing rate of each database, wherein the step of creating a plurality of table sets is performed according to the determined maximum number of table sets and maximum table sharing rate of each database; wherein the step of creating the plurality of table sets further comprises the steps of: assigning each new tenant to an already created table set in response to the new tenant on-boarding if it is determined that the table set has not reached the maximum table sharing rate in a current database; assigning each new tenant to a new table set if it is determined that there is no table set that has not reached the maximum table sharing rate in the current database and it is determined that the number of table sets in the current database has not reached the maximum number of table sets; and repeating the steps on the next database until each of the one or more databases contains the maximum number of table sets and each table set reaches the maximum table sharing rate.