# US 12,182,094 B2 · Multi-database subsetting

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

- Number: US 12,182,094 B2
- Document ID: US12182094B2
- Status: Granted
- Kind: B2
- Application number: 18/116,771
- Filed: 2023-03-02
- Published: 2023-06-29
- Granted: 2024-12-31
- Earliest claimed: 2021-03-29
- Assignees: Tonic AI, Inc.
- Applicants: Tonic AI, Inc.
- Inventors: John Kristopher Goodnow; Andrew C. Colombi; Adam Jacob Kamor
- Web page: https://patentgrep.com/patent/US12182094B2

## CPC

- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/2445: {Data retrieval commands; View definitions}
- G06F 16/256: {in federated or virtual databases}
- G06F 16/288: {Entity relationship models}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Generating a subsetting traversal plan includes receiving a set of source tables. It further includes sorting the set of source tables based at least in part on dependency relationships among tables in the set of source tables. It further includes generating a traversal order based at least in part on the sorting of the set of source tables. It further includes providing the traversal order as output.

## Claims

### Claim 1

A system, comprising:
one or more hardware processors configured to:
receive a set of source tables;
sort the set of source tables based at least in part on dependency relationships among tables in the set of source tables;
automatically generate a traversal order based at least in part on the sorting of the set of source tables, wherein generating the traversal order comprises:
visiting a table in the set of source tables;
including, in a priority queue, a neighboring table of the table being visited, wherein the priority queue comprises one of an upstream priority queue or a downstream priority queue, wherein the neighboring table comprises a table that is upstream of the table being visited, and wherein the neighboring table that is upstream of the table being visited includes a foreign key that refers to a primary key in the table being visited; and
selecting, from the priority queue, a next table to visit in the traversal order, wherein the next table to visit is selected from one of the upstream priority queue or the downstream priority queue; and
provide the traversal order as output, wherein during a subsetting phase, source tables in the set of source tables are visited according to the automatically generated traversal order and subsets of the visited source tables are extracted at least in part by performing one or more database queries; and
a memory coupled to the one or more hardware processors and configured to provide the one or more hardware processors with instructions.

### Claim 2 (depends on 1)

The system recited in claim 1, wherein the one or more hardware processors are further configured to record whether the next table is selected from the upstream priority queue or the downstream priority queue.

### Claim 3 (depends on 1)

The system recited in claim 1, wherein during the subsetting phase, a subset of data extracted from a source table is based at least in part on a determination of whether the source table had been selected from the upstream priority queue or the downstream priority queue.

### Claim 4 (depends on 1)

The system recited in claim 1, wherein the neighboring table that is upstream of the table being visited is included in the upstream priority queue.

### Claim 5 (depends on 4)

The system recited in claim 4, wherein the one or more hardware processors are configured to place the neighboring table that is upstream of the table being visited in the upstream priority queue based at least in part on a number of ancestors of the neighboring table that is upstream of the table being visited.

### Claim 6 (depends on 1)

The system recited in claim 1, wherein a neighboring table that is downstream of the table being visited includes a primary key that a foreign key in the table being visited refers to.

### Claim 7 (depends on 6)

The system recited in claim 6, wherein the neighboring table that is downstream of the table being visited is included in the downstream priority queue.

### Claim 8 (depends on 7)

The system recited in claim 7, wherein the one or more hardware processors are configured to place the neighboring table that is downstream of the table being visited in the downstream priority queue based at least in part on a number of ancestors of the neighboring table that is downstream of the table being visited.

### Claim 9

A method, comprising:
receiving a set of source tables;
sorting the set of source tables based at least in part on dependency relationships among tables in the set of source tables;
automatically generating, using one or more hardware processors, a traversal order based at least in part on the sorting of the set of source tables, wherein generating the traversal order comprises:
visiting a table in the set of source tables;
including, in a priority queue, a neighboring table of the table being visited, wherein the priority queue comprises one of an upstream priority queue or a downstream priority queue, wherein the neighboring table comprises a table that is upstream of the table being visited, and wherein the neighboring table that is upstream of the table being visited includes a foreign key that refers to a primary key in the table being visited; and
selecting, from the priority queue, a next table to visit in the traversal order, wherein the next table to visit is selected from one of the upstream priority queue or the downstream priority queue; and
providing the traversal order as output, wherein during a subsetting phase, source tables in the set of source tables are visited according to the automatically generated traversal order and subsets of the visited source tables are extracted at least in part by performing one or more database queries.

### Claim 10 (depends on 9)

The method of claim 9, further comprising recording whether the next table is selected from the upstream priority queue or the downstream priority queue.

### Claim 11 (depends on 9)

The method of claim 9, wherein during the subsetting phase, a subset of data extracted from a source table is based at least in part on a determination of whether the source table had been selected from the upstream priority queue or the downstream priority queue.

### Claim 12 (depends on 9)

The method of claim 9, wherein the neighboring table that is upstream of the table being visited is included in the upstream priority queue.

### Claim 13 (depends on 12)

The method of claim 12, comprising placing the neighboring table that is upstream of the table being visited in the upstream priority queue based at least in part on a number of ancestors of the neighboring table that is upstream of the table being visited.

### Claim 14 (depends on 9)

The method of claim 9, wherein a neighboring table that is downstream of the table being visited includes a primary key that a foreign key in the table being visited refers to.

### Claim 15 (depends on 14)

The method of claim 14, wherein the neighboring table that is downstream of the table being visited is included in the downstream priority queue.

### Claim 16 (depends on 15)

The method of claim 15, comprising placing the neighboring table that is downstream of the table being visited in the downstream priority queue based at least in part on a number of ancestors of the neighboring table that is downstream of the table being visited.
