IP Library Granted Patent US 10,719,533
Granted Patent B2
US 10,719,533 · App. 15/861,470 · Granted Jul 21, 2020

Multi-tenant tables of a distributed database

Inventors: Benjamin Busjaeger (San Carlos, CA); Scott Hansma (San Francisco, CA); Pallav Kothari (San Francisco, CA); Michael Sgroi (San Francisco, CA)
Assignee: salesforce.com, inc.
G06F16/278G06F16/2255G06F16/2282G06F16/27
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,719,533
App. No.
15/861,470
Granted
Jul 21, 2020
Kind
B2
Abstract

A system may store data in a shared table of a distributed database based on generating a tenant-specific partition key. The system may receive a message from a first tenant that indicates certain data to be written to or retrieved from a shared table (e.g., shared between multiple tenants). The system may then identify a data key, a tenant identifier, and a data type identifier associated with the data and generate a partition key that includes the data key, tenant identifier, and data type identifier. The system may then transmit the partition key to the shared table, and data may be written to or retrieved from the table based on the tenant-specific partition key.

Claims (44)

1. A method for storing data in a shared table of a distributed database, comprising:

receiving a message from a first tenant of a plurality of tenants that indicates data to be written to or retrieved from the shared table, the data corresponding to at least one user record in the shared table;

identifying a data key associated with the data, a tenant identifier associated with the data, the tenant identifier corresponding to the first tenant of the plurality of tenants, and a data type identifier associated with the data, the data type identifier corresponding to a logical type of data associated with the data;

generating a partition key, wherein the partition key comprises the data key, the tenant identifier, and the data type identifier;

identifying a sort key and a sort key type associated with the data, the sort key corresponding to at least one attribute associated with the data; and

transmitting the partition key and the sort key to the shared table, wherein the data is written to or retrieved from the shared table based at least in part on the partition key, and the sort key type indicates the shared table of a plurality of shared tables to which the partition key and the sort key are transmitted.

2. The method of claim 1 , further comprising:

determining which shared table of the plurality of shared tables to transmit the partition key to based at least in part on identifying the data type identifier associated with the data, wherein the partition key and the sort key are transmitted based at least in part on the determination.

3. The method of claim 1 , wherein the sort key type comprises one of a sort key type number, a sort key type string, or a sort key type binary.

4. The method of claim 1 , further comprising:

identifying a secondary index associated with the data, the secondary index corresponding to one or more attributes that are different than at least one attribute corresponding to the sort key; and

generating the partition key based at least in part on identifying the secondary index.

5. The method of claim 4 , wherein the data written to or retrieved from the shared table based at least on the partition key is sorted according to the secondary index.

6. The method of claim 1 , wherein the distributed database comprises a Distributed Hash Table (DHT).

7. The method of claim 1 , wherein the distributed database comprises a Dynamo storage system.

8. The method of claim 1 , wherein the message is associated with a specific application associated with the first tenant.

9. An apparatus for storing data in a shared table of a distributed database, comprising:

a processor;

memory in electronic communication with the processor; and

instructions stored in the memory and executable by the processor to cause the apparatus to:

receive a message from a first tenant of a plurality of tenants that indicates data to be written to or retrieved from the shared table, the data corresponding to at least one user record in the shared table;

identify a data key associated with the data, a tenant identifier associated with the data, the tenant identifier corresponding to the first tenant of the plurality of tenants, and a data type identifier associated with the data, the data type identifier corresponding to a logical type of data associated with the data;

generate a partition key, wherein the partition key comprises the data key, the tenant identifier, and the data type identifier;

identify a sort key and a sort key type associated with the data, the sort key corresponding to at least one attribute associated with the data; and

transmit the partition key and the sort key to the shared table, wherein the data is written to or retrieved from the shared table based at least in part on the partition key, and the sort key type indicates the shared table of a plurality of shared tables to which the partition key and the sort key are transmitted.

10. The apparatus of claim 9 , wherein the instructions are further executable by the processor to cause the apparatus to:

determine which shared table of the plurality of shared tables to transmit the partition key to based at least in part on identifying the data type identifier associated with the data, wherein the partition key and the sort key are transmitted based at least in part on the determination.

11. The apparatus of claim 9 , wherein the sort key type comprises one of a sort key type number, a sort key type string, or a sort key type binary.

12. The apparatus of claim 9 , wherein the instructions are further executable by the processor to cause the apparatus to:

identify a secondary index associated with the data, the secondary index corresponding to one or more attributes that are different than at least one attribute corresponding to the sort key; and

generate the partition key based at least in part on identifying the secondary index.

13. The apparatus of claim 12 , wherein the data written to or retrieved from the shared table based at least on the partition key is sorted according to the secondary index.

14. A non-transitory computer-readable medium storing code for storing data in a shared table of a distributed database, the code comprising instructions executable by a processor to:

receive a message from a first tenant of a plurality of tenants that indicates data to be written to or retrieved from the shared table, the data corresponding to at least one user record in the shared table;

identify a data key associated with the data, a tenant identifier associated with the data, the tenant identifier corresponding to the first tenant of the plurality of tenants, and a data type identifier associated with the data, the data type identifier corresponding to a logical type of data associated with the data;

generate a partition key, wherein the partition key comprises the data key, the tenant identifier, and the data type identifier;

identify a sort key and a sort key type associated with the data, the sort key corresponding to at least one attribute associated with the data; and

transmit the partition key and the sort key to the shared table, wherein the data is written to or retrieved from the shared table based at least in part on the partition key, and the sort key type indicates the shared table of a plurality of shared tables to which the partition key and the sort key are transmitted.

15. The non-transitory computer-readable medium of claim 14 , wherein the instructions are further executable by the processor to:

determine which shared table of the plurality of shared tables to transmit the partition key to based at least in part on identifying the data type identifier associated with the data, wherein the partition key and the sort key are transmitted based at least in part on the determination.

16. The non-transitory computer-readable medium of claim 14 , wherein the sort key type comprises one of a sort key type number, a sort key type string, or a sort key type binary.

17. The non-transitory computer-readable medium of claim 14 , wherein the instructions are further executable by the processor to:

identify a secondary index associated with the data, the secondary index corresponding to one or more attributes that are different than at least one attribute corresponding to the sort key; and

generate the partition key based at least in part on identifying the secondary index.

Assignments (2)
CHANGE OF NAME Recorded Nov 21, 2024
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 069431/0247 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 12, 2018
From: BUSJAEGER, BENJAMIN; HANSMA, SCOTT; KOTHARI, PALLAV; SGROI, MICHAEL
To: SALESFORCE.COM, INC.
Reel/Frame 044607/0608 →
Continuity (1)
Related Publication 20190205459A1 · Jul 4, 2019