Tenant table sharing with content separation
AssigneeSap SE
InventorsJuergen Specht, Volker Driesen
Life of this patent
Estimating the term…
Abstract
Implementations include providing a database system that a plurality of tenant systems interact with, providing a shared database schema and a plurality of tenant database schemas, the shared database schema including a shared table, and each tenant database schema being assigned to a respective tenant and including a view into the shared table, which includes a tenant specification field, and a row visibility field, the tenant specification field indicating a tenant, to which a respective row is assigned, and the row visibility field indicating visibility of a respective row to respective tenants.
Claims20
A computer-implemented method for managing access to, and modification of shared data in multi-tenant systems, the computer-implemented method being executed by one or more processors and comprising:
- providing, by the one or more processors, a database system that each tenant system of a plurality of tenant systems interacts with;
- providing, by the one or more processors, a shared database schema and a plurality of tenant database schemas in the database system, the shared database schema comprising at least one shared table, a view into the at least one shared table, the at least one shared table comprising a read-write table storing shared data and tenant-specific data, and each row of the at least one shared table being assigned to a specific tenant and comprising a tenant specification field, a data field, and a row visibility field, the tenant specification field indicating a specific tenant, to which a respective row is assigned, the data field storing shared data when a tenant specification value of the tenant specification field indicates a shared tenant and tenant-specific data when the tenant specification value of the tenant specification field indicates a tenant in the respective row, and the row visibility field indicating visibility of a respective row to respective tenants;
- for a first tenant:
- reading shared data from the at least one shared table based on a first view of a first tenant database schema, the first view comprising a view into the at least one shared table and defining at least two tenant specification values including the tenant specification value indicating the shared tenant, and a hidebit column corresponding to the first tenant in the row visibility field, the shared data being stored in a row having the tenant specification value assigned to the shared tenant, and having an unset hidebit corresponding to the first tenant in the hidebit column corresponding to the first tenant in the row visibility field, and
- transmitting the shared data to the first tenant;
- and
- for a second tenant:
- inhibiting reading of shared data from the at least one shared table, the shared data being stored in a row having one of a tenant specification value assigned to another tenant, and a set hidebit corresponding to the second tenant.
A non-transitory computer-readable storage medium coupled to one or more processors and having instructions stored thereon which, when executed by the one or more processors, cause the one or more processors to perform operations for managing access to, and modification of shared data in multi-tenant systems, the operations comprising:
- providing a database system that each tenant system of a plurality of tenant systems interacts with;
- providing a shared database schema and a plurality of tenant database schemas in the database system, the shared database schema comprising at least one shared table, a view into the at least one shared table, the at least one shared table comprising a read-write table storing shared data and tenant-specific data, and each row of the at least one shared table being assigned to a specific tenant and comprising a tenant specification field, a data field, and a row visibility field, the tenant specification field indicating a specific tenant, to which a respective row is assigned, the data field storing shared data when a tenant specification value of the tenant specification field indicates a shared tenant and tenant-specific data when the tenant specification value of the tenant specification field indicates a tenant in the respective row, and the row visibility field indicating visibility of a respective row to respective tenants;
- for a first tenant:
- reading shared data from the at least one shared table based on a first view of a first tenant database schema, the first view comprising a view into the at least one shared table and defining at least two tenant specification values including the tenant specification value indicating the shared tenant, and a hidebit column corresponding to the first tenant in the row visibility field, the shared data being stored in a row having the tenant specification value assigned to the shared tenant, and having an unset hidebit corresponding to the first tenant in the hidebit column corresponding to the first tenant in the row visibility field, and
- transmitting the shared data to the first tenant;
- and
- for a second tenant:
- inhibiting reading of shared data from the at least one shared table, the shared data being stored in a row having one of a tenant specification value assigned to another tenant, and a set hidebit corresponding to the second tenant.
A system, comprising:
- a computing device;
- and
- a computer-readable storage device coupled to the computing device and having instructions stored thereon which, when executed by the computing device, cause the computing device to perform operations for managing access to, and modification of shared data in multi-tenant systems, the operations comprising:
- providing a database system that each tenant system of a plurality of tenant systems interacts with;
- providing a shared database schema and a plurality of tenant database schemas in the database system, the shared database schema comprising at least one shared table, a view into the at least one shared table, the at least one shared table comprising a read-write table storing shared data and tenant-specific data, and each row of the at least one shared table being assigned to a specific tenant and comprising a tenant specification field, a data field, and a row visibility field, the tenant specification field indicating a specific tenant, to which a respective row is assigned, the data field storing shared data when a tenant specification value of the tenant specification field indicates a shared tenant and tenant-specific data when the tenant specification value of the tenant specification field indicates a tenant in the respective row, and the row visibility field indicating visibility of a respective row to respective tenants;
- for a first tenant:
- reading shared data from the at least one shared table based on a first view of a first tenant database schema, the first view comprising a view into the at least one shared table and defining at least two tenant specification values including the tenant specification value indicating the shared tenant, and a hidebit column corresponding to the first tenant in the row visibility field, the shared data being stored in a row having the tenant specification value assigned to the shared tenant, and having an unset hidebit corresponding to the first tenant in the hidebit column corresponding to the first tenant in the row visibility field, and transmitting the shared data to the first tenant;
- and
- for a second tenant:
- inhibiting reading of shared data from the at least one shared table, the shared data being stored in a row having one of a tenant specification value assigned to another tenant, and a set hidebit corresponding to the second tenant.
Dependencies are inferred from the claim text.