CUSTOM ENTITIES AND FIELDS IN A MULTI-TENANT DATABASE SYSTEM
First Claim
1. A computer-implemented method of storing multiple fields for multiple tenants in a single multi-tenant data structure, comprising:
- defining a multi-tenant data structure having a plurality of data columns and one or more index columns;
defining a first data field for a first tenant, said first field having a first data type;
defining a second data field for a second tenant, said second field having a second data type, wherein the second data type is different than said first data type;
when records having data values in the first and second fields are created by the first and second tenants, storing the data values of first and second fields to a single column in the data structure, wherein the single column includes data values having different data types for different tenants; and
copying to a first one of the index columns the data values stored in the single data column for the first field in response to a request from the first tenant to index data in the first data field.
1 Assignment
0 Petitions
Accused Products
Abstract
Systems and methods for hosting variable schema data such as dynamic tables and columns in a fixed physical database schema. Standard objects, such as tables are provided for use by multiple tenants or organizations in a multi-tenant database system. Each organization may add or define custom fields for inclusion in a standard object. Custom fields for multiple tenants are stored in a single field within the object data structure, and this single field may contain different data types for each tenant. Indexing columns are also provided, wherein a tenant may designate a field for indexing. Data values for designated fields are copied to an index column, and each index column may include multiple data types. Each organization may also define custom objects including custom fields and indexing columns. Custom objects for multiple tenants are stored in a single custom object data structure. The primary key values for the single custom object table are globally unique, but also include an object-specific identifier which may be re-used among different entities.
97 Citations
23 Claims
-
1. A computer-implemented method of storing multiple fields for multiple tenants in a single multi-tenant data structure, comprising:
-
defining a multi-tenant data structure having a plurality of data columns and one or more index columns; defining a first data field for a first tenant, said first field having a first data type; defining a second data field for a second tenant, said second field having a second data type, wherein the second data type is different than said first data type; when records having data values in the first and second fields are created by the first and second tenants, storing the data values of first and second fields to a single column in the data structure, wherein the single column includes data values having different data types for different tenants; and copying to a first one of the index columns the data values stored in the single data column for the first field in response to a request from the first tenant to index data in the first data field. - View Dependent Claims (2, 3, 4)
-
-
5. A computer-implemented method of hosting multiple tables for one or more organizations in a single multi-tenant data structure, comprising:
-
defining a multi-tenant data structure having a primary key column, an organization id column and a plurality of data columns; defining a first table for a first tenant, said first table having a first data field, and said first tenant having a first tenant id; assigning a first table id to the first table; defining a second table for a second tenant, said second table having a second data field, and said second tenant having a second tenant id; assigning a second table id to the second table; wherein when records are created for the first table by the first tenant, for each created record; a) storing the value of the first data field to a single data column in the data structure; b) storing the first tenant id in the organization id column; and c) storing the first table id to the primary key column; and wherein when records are created for the second table by the second tenant, for each created record; a) storing the value of the second data field to said single data column in the data structure; b) storing the second tenant id in the organization id column; and c) storing the second table id to the primary key column; and wherein the first and second tables of the first and second tenants are stored in the data structure. - View Dependent Claims (6, 7, 8)
-
-
9. A computer-implemented method of storing multiple tables for one or more tenants in a single data structure, comprising:
-
defining a data structure having a primary key column, an organization id column and a plurality of data columns; defining a first table for a first tenant, said first table having a first data field, said first data field having a first data type, and said first tenant having a first tenant id; assigning a first table id to the first table; defining a second table for the first tenant, said second table having a second data field, said second data field having a second data type different from the first data type; assigning a second table id to the second table; wherein when records are created for the first table, for each created record; a) storing the value of the first data field to a single data column in the data structure; b) storing the first tenant id in the organization id column; and c) storing the first table id to the primary key column; and wherein when records are created for the second table, for each created record; a) storing the value of the second data field to said single data column; b) storing the first tenant id in the organization id column; and c) storing the second table id to the primary key column; wherein the first and second tables of the first tenant are stored in the data structure, and wherein said single data column includes data values having said first and second data types. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16, 17, 18, 19)
-
-
20. A computer readable medium storing code for controlling a database system to store multiple fields for multiple tenants in a single multi-tenant data structure, the code comprising instructions to:
-
define a multi-tenant data structure having a plurality of data columns and one or more index columns; define a first data field for a first tenant, said first field having a first data type; define a second data field for a second tenant, said second field having a second data type, wherein the second data type is different than said first data type; store the data values of first and second fields to a single column in the data structure when records having data values in the first and second fields are created by the first and second tenants, wherein the single column includes data values having different data types for different tenants; and copy to a first one of the index columns the data values stored in the single data column for the first field in response to a request from the first tenant to index data in the first data field.
-
-
21. A computer readable medium storing code for controlling a database system to store multiple fields for multiple tenants in a single multi-tenant data structure, the code comprising instructions to:
-
define a multi-tenant data structure having a primary key column, an organization id column and a plurality of data columns; define a first table for a first tenant, said first table having a first data field, and said first tenant having a first tenant id; assign a first table id to the first table; define a second table for a second tenant, said second table having a second data field, and said second tenant having a second tenant id; assign a second table id to the second table; wherein when records are created for the first table by the first tenant, for each created record; a) store the value of the first data field to a single data column in the data structure; b) store the first tenant id in the organization id column; and c) store the first table id to the primary key column; and wherein when records are created for the second table by the second tenant, for each created record; a) store the value of the second data field to said single data column in the data structure; b) store the second tenant id in the organization id column; and c) store the second table id to the primary key column; and wherein the first and second tables of the first and second tenants are stored in the data structure.
-
-
22. A multi-tenant database system, comprising:
-
a database for storing multi-tenant data objects; and a database management process configured to; define a multi-tenant data structure in the database, the data structure having a plurality of data columns and one or more index columns; define a first data field for a first tenant, said first field having a first data type; define a second data field for a second tenant, said second field having a second data type, wherein the second data type is different than said first data type; store the data values of first and second fields to a single column in the data structure when records having data values in the first and second fields are created by the first and second tenants, wherein the single column includes data values having different data types for different tenants; and copy to a first one of the index columns the data values stored in the single data column for the first field in response to a request from the first tenant to index data in the first data field.
-
-
23. A multi-tenant database system, comprising:
-
a database for storing multi-tenant data objects; and a database management process configured to; define a multi-tenant data structure in the database, wherein the data structure has a primary key column, an organization id column and a plurality of data columns; define a first table for a first tenant, said first table having a first data field, and said first tenant having a first tenant id; assign a first table id to the first table; define a second table for a second tenant, said second table having a second data field, and said second tenant having a second tenant id; assign a second table id to the second table; wherein when records are created for the first table by the first tenant, for each created record; a) store the value of the first data field to a single data column in the data structure; b) store the first tenant id in the organization id column; and c) store the first table id to the primary key column; and wherein when records are created for the second table by the second tenant, for each created record; a) store the value of the second data field to said single data column in the data structure; b) store the second tenant id in the organization id column; and c) store the second table id to the primary key column; and wherein the first and second tables of the first and second tenants are stored in the data structure
-
Specification