# US 2023/0067776 A1 · Multi-Tenant Partitioned Data Store Using Key/Value Buckets

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0067776 A1
- Document ID: US20230067776A1
- Status: Published application
- Kind: A1
- Application number: 17/407,993
- Filed: 2021-08-20
- Published: 2023-03-02
- Earliest claimed: 2021-08-20
- Assignees: salesforce.com, inc.
- Applicants: salesforce.com, inc.
- Inventors: Igor Fedorenko; Helen Kwong; Benjamin Busjaeger
- Web page: https://patentgrep.com/patent/US20230067776A1

## CPC

- G06F 16/2255: {Hash tables}
- G06F 16/278: {Data partitioning, e.g. horizontal or vertical partitioning}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques are disclosed relating to multi-tenant database systems with underlying key/value storage. In some embodiments, a computing system generates first logical table information for a first portion of a multi-tenant dataset corresponding to a first tenant and second logical table information for a second portion of the dataset corresponding to a second tenant. The system may store the first and second logical tables using non-relational key/value data structures in one or more storage elements, including: storing entries from the first logical table across a first set of multiple key/value store buckets and storing entries from the second logical table across a second set of multiple key/value store buckets. Disclosed techniques may reduce performance issues due to hotspots while allowing efficient data access for a given tenant by limiting the number of buckets per tenant, relative to traditional techniques.

## Claims

### Claim 1

A method, comprising:
processing, by a computing system, a multi-tenant dataset, including:
generating first logical table information for a first portion of the dataset corresponding to a first tenant;
generating second logical table information for a second portion of the dataset corresponding to a second tenant;
storing the first and second logical tables using non-relational key/value data structures in one or more storage elements, including:
storing entries from the first logical table across a first set of multiple key/value store buckets; and
storing entries from the second logical table across a second set of multiple key/value store buckets.

### Claim 2 (depends on 1)

The method of claim 1, wherein entries in respective key/value store buckets are sortable.

### Claim 3 (depends on 1)

The method of claim 1, wherein the first and second sets of multiple key/value store buckets at least partially overlap.

### Claim 4 (depends on 1)

The method of claim 1, wherein the storing uses partition keys to spread entries from the first and second logical tables across multiple key/value store buckets.

### Claim 5 (depends on 4)

The method of claim 4, wherein the partition keys include a logical table identifier and a bucket number.

### Claim 6 (depends on 5)

The method of claim 5, further comprising generating bucket numbers using a stable hash function.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
generating internal identifiers for key/value storage for names associated with the first and second logical tables according to a mapping technique, wherein a given internal identifier uses a smaller number of bits than its corresponding name.

### Claim 8 (depends on 7)

The method of claim 7, wherein the mapping technique provides consistency such that a first name value used during a first time interval and re-used during a second time interval is mapped to two different internal identifiers during the different first and second time intervals.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
generating a shorter key value using a mapping function, wherein the mapping function encodes output values using a classification field that indicates a size and range of the output value and wherein the mapping function and preserves ordering among keys for a given bucket.

### Claim 10

A system, comprising:
one or more processors; and
one or more storage elements having program instructions stored thereon that are capable of being executed by the one or more processors to cause operations comprising:
processing a multi-tenant dataset, including:
generating first logical table information for a first portion of the dataset corresponding to a first tenant;
generating second logical table information for a second portion of the dataset corresponding to a second tenant;
storing the first and second logical tables using non-relational key/value data structures in one or more storage elements, including:
storing entries from the first logical table across a first set of multiple key/value store buckets; and
storing entries from the second logical table across a second set of multiple key/value store buckets.

### Claim 11 (depends on 10)

The system of claim 10, wherein entries in respective key/value store buckets are sortable.

### Claim 12 (depends on 10)

The system of claim 10, wherein the storing uses partition keys to spread entries from the first and second logical tables across multiple key/value store buckets.

### Claim 13

A non-transitory computer-readable medium having computer instructions stored thereon that are capable of being executed by a computer system to cause operations comprising:
processing a multi-tenant dataset, including:
generating first logical table information for a first portion of the dataset corresponding to a first tenant;
generating second logical table information for a second portion of the dataset corresponding to a second tenant;
storing the first and second logical tables using non-relational key/value data structures in one or more storage elements, including:
storing entries from the first logical table across a first set of multiple key/value store buckets; and
storing entries from the second logical table across a second set of multiple key/value store buckets.

### Claim 14 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein entries in respective key/value store buckets are sortable.

### Claim 15 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein the first and second sets of multiple key/value store buckets at least partially overlap.

### Claim 16 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein the storing uses partition keys to spread entries from the first and second logical tables across multiple key/value store buckets.

### Claim 17 (depends on 16)

The non-transitory computer-readable medium of claim 16, wherein the partition keys include a logical table identifier and a bucket number.

### Claim 18 (depends on 17)

The non-transitory computer-readable medium of claim 17, wherein the operations further comprise generating bucket numbers using a stable hash function.

### Claim 19 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein the operations further comprise generating internal identifiers for key/value storage for names associated with the first and second logical tables according to a mapping technique, wherein a given internal identifier uses a smaller number of bits than its corresponding name.

### Claim 20 (depends on 19)

The non-transitory computer-readable medium of claim 19, wherein the mapping technique provides consistency such that a first name value used during a first time interval and re-used during a second time interval is mapped to two different internal identifiers during the different time intervals.
