Truncating data associated with objects in a multi-tenant database
First Claim
1. A computer-implemented method of truncating data from a multi-tenant database that maintains database objects for a plurality of different tenants, each database object in the multi-tenant database being identified by a unique combination of a key prefix and a tenant identifier, the method comprising:
- maintaining an entity definition table having a plurality of metadata entries corresponding to the database objects, including a metadata entry for an existing database object, the metadata entry comprising a tenant identifier for a particular tenant associated with the existing database object, an entity name for the existing database object, and an old key prefix for the existing database object;
obtaining an instruction to remove all data from the existing database object; and
in response to obtaining the instruction, updating the metadata entry to replace the old key prefix with a new key prefix that is not currently associated with any other database object for the particular tenant, wherein updating the metadata entry results in an updated database object that is identified by the new key prefix and the tenant identifier, wherein;
each entry in the existing database object is uniquely associated with a respective entity identifier that begins with the old key prefix; and
each entry in the updated database object is uniquely associated with a respective entity identifier that begins with the new key prefix.
1 Assignment
0 Petitions
Accused Products
Abstract
An exemplary embodiment of a multi-tenant database system is provided. The system includes a multi-tenant database, an entity definition table, and a data processing engine. The database has database objects for multiple tenants, including an existing object for a designated tenant. Each entry in the existing object has a respective entity identifier. The definition table has metadata entries for the database objects, including a metadata entry for the existing object. This metadata entry has a tenant identifier for the designated tenant, an entity name for the existing object, and an old key prefix for the existing object. Each entity identifier of the existing object begins with the old key prefix. The engine performs a data truncation operation on the existing object by updating the metadata entry to replace the old key prefix with a new key prefix. This results in an updated object that is identified by the new key prefix and the tenant identifier.
-
Citations
18 Claims
-
1. A computer-implemented method of truncating data from a multi-tenant database that maintains database objects for a plurality of different tenants, each database object in the multi-tenant database being identified by a unique combination of a key prefix and a tenant identifier, the method comprising:
-
maintaining an entity definition table having a plurality of metadata entries corresponding to the database objects, including a metadata entry for an existing database object, the metadata entry comprising a tenant identifier for a particular tenant associated with the existing database object, an entity name for the existing database object, and an old key prefix for the existing database object; obtaining an instruction to remove all data from the existing database object; and in response to obtaining the instruction, updating the metadata entry to replace the old key prefix with a new key prefix that is not currently associated with any other database object for the particular tenant, wherein updating the metadata entry results in an updated database object that is identified by the new key prefix and the tenant identifier, wherein; each entry in the existing database object is uniquely associated with a respective entity identifier that begins with the old key prefix; and each entry in the updated database object is uniquely associated with a respective entity identifier that begins with the new key prefix. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A multi-tenant database system comprising:
-
a data storage system implementing a multi-tenant database that maintains database objects for a plurality of different tenants, each database object in the multi-tenant database being identified by a unique combination of a key prefix and a tenant identifier; an entity definition table having a plurality of metadata entries corresponding to the database objects, and including a metadata entry for an existing database object, the metadata entry comprising a tenant identifier for a particular tenant associated with the existing database object, an entity name for the existing database object, and an old key prefix for the existing database object; and processing hardware comprising a processor configured to perform a data truncation operation on the existing database object by obtaining an instruction to remove all data from the existing database object, and, in response to obtaining the instruction, updating the metadata entry to replace the old key prefix with a new key prefix that is not currently associated with any other database object for the particular tenant, wherein updating the metadata entry results in an updated database object that is identified by the new key prefix and the tenant identifier, wherein; each entry in the existing database object is uniquely associated with a respective entity identifier that begins with the old key prefix; and each entry in the updated database object is uniquely associated with a respective entity identifier that begins with the new key prefix. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A computer-implemented method of truncating data from a multi-tenant database that maintains database objects for a plurality of different tenants, each database object in the multi-tenant database being identified by a unique combination of a key prefix and a tenant identifier, the method comprising:
-
maintaining an entity definition table having a plurality of metadata entries corresponding to the database objects, including a metadata entry for an existing database object, the metadata entry comprising a tenant identifier for a particular tenant associated with the existing database object, an entity name for the existing database object, and an old key prefix for the existing database object; obtaining an instruction to remove all data from the existing database object; and in response to obtaining the instruction, updating the metadata entry to replace the old key prefix with a new key prefix that is not currently associated with any other database object for the particular tenant, wherein updating the metadata entry results in an updated database object that is identified by the new key prefix and the tenant identifier, wherein; the existing database object includes a first entry that is linked to a foreign key maintained in a second entry of a target database object, the foreign key stored in a field identified by a first column number; and updating the metadata entry comprises altering metadata for the second entry of the target database object by replacing the first column number with a new and previously unused column number.
-
-
14. A computer-implemented method of truncating data from a multi-tenant database that maintains database objects for a plurality of different tenants, each database object in the multi-tenant database being identified by a unique combination of a key prefix and a tenant identifier, the method comprising:
-
maintaining an entity definition table having a plurality of metadata entries corresponding to the database objects, including a metadata entry for an existing database object, the metadata entry comprising a tenant identifier for a particular tenant associated with the existing database object, an entity name for the existing database object, and an old key prefix for the existing database object; obtaining an instruction to remove all data from the existing database object; and in response to obtaining the instruction, updating the metadata entry to replace the old key prefix with a new key prefix that is not currently associated with any other database object for the particular tenant, wherein updating the metadata entry results in an updated database object that is identified by the new key prefix and the tenant identifier, wherein; the existing database object includes a first entry that is linked to a foreign key maintained in a second entry of a target database object; and the method further comprises removing the second entry of the target database object in response to replacing the old key prefix with the new key prefix.
-
-
15. A computer-implemented method of truncating data from a multi-tenant database that maintains database objects for a plurality of different tenants, each database object in the multi-tenant database being identified by a unique combination of a key prefix and a tenant identifier, the method comprising:
-
maintaining an entity definition table having a plurality of metadata entries corresponding to the database objects, including a metadata entry for an existing database object, the metadata entry comprising a tenant identifier for a particular tenant associated with the existing database object, an entity name for the existing database object, and an old key prefix for the existing database object; obtaining an instruction to remove all data from the existing database object; and in response to obtaining the instruction, updating the metadata entry to replace the old key prefix with a new key prefix that is not currently associated with any other database object for the particular tenant, wherein updating the metadata entry results in an updated database object that is identified by the new key prefix and the tenant identifier, wherein; the existing database object includes a first entry that is linked to a summary field value maintained in a second entry of a target database object; and the method further comprises updating the summary field value in response to replacing the old key prefix with the new key prefix.
-
-
16. A multi-tenant database system comprising:
-
a data storage system implementing a multi-tenant database that maintains database objects for a plurality of different tenants, each database object in the multi-tenant database being identified by a unique combination of a key prefix and a tenant identifier; an entity definition table having a plurality of metadata entries corresponding to the database objects, and including a metadata entry for an existing database object, the metadata entry comprising a tenant identifier for a particular tenant associated with the existing database object, an entity name for the existing database object, and an old key prefix for the existing database object; and processing hardware comprising a processor configured to perform a data truncation operation on the existing database object by obtaining an instruction to remove all data from the existing database object, and, in response to obtaining the instruction, updating the metadata entry to replace the old key prefix with a new key prefix that is not currently associated with any other database object for the particular tenant, wherein updating the metadata entry results in an updated database object that is identified by the new key prefix and the tenant identifier, wherein; the existing database object includes a first entry that is linked to a foreign key maintained in a second entry of a target database object, the foreign key stored in a field identified by a first column number; and updating the metadata entry comprises altering metadata for the second entry of the target database object by replacing the first column number with a new and previously unused column number.
-
-
17. A multi-tenant database system comprising:
-
a data storage system implementing a multi-tenant database that maintains database objects for a plurality of different tenants, each database object in the multi-tenant database being identified by a unique combination of a key prefix and a tenant identifier; an entity definition table having a plurality of metadata entries corresponding to the database objects, and including a metadata entry for an existing database object, the metadata entry comprising a tenant identifier for a particular tenant associated with the existing database object, an entity name for the existing database object, and an old key prefix for the existing database object; and processing hardware comprising a processor configured to perform a data truncation operation on the existing database object by obtaining an instruction to remove all data from the existing database object, and, in response to obtaining the instruction, updating the metadata entry to replace the old key prefix with a new key prefix that is not currently associated with any other database object for the particular tenant, wherein updating the metadata entry results in an updated database object that is identified by the new key prefix and the tenant identifier, wherein; the existing database object includes a first entry that is linked to a foreign key maintained in a second entry of a target database object; and the method further comprises removing the second entry of the target database object in response to replacing the old key prefix with the new key prefix.
-
-
18. A multi-tenant database system comprising:
-
a data storage system implementing a multi-tenant database that maintains database objects for a plurality of different tenants, each database object in the multi-tenant database being identified by a unique combination of a key prefix and a tenant identifier; an entity definition table having a plurality of metadata entries corresponding to the database objects, and including a metadata entry for an existing database object, the metadata entry comprising a tenant identifier for a particular tenant associated with the existing database object, an entity name for the existing database object, and an old key prefix for the existing database object; and processing hardware comprising a processor configured to perform a data truncation operation on the existing database object by obtaining an instruction to remove all data from the existing database object, and, in response to obtaining the instruction, updating the metadata entry to replace the old key prefix with a new key prefix that is not currently associated with any other database object for the particular tenant, wherein updating the metadata entry results in an updated database object that is identified by the new key prefix and the tenant identifier, wherein; the existing database object includes a first entry that is linked to a summary field value maintained in a second entry of a target database object; and the method further comprises updating the summary field value in response to replacing the old key prefix with the new key prefix.
-
Specification