# US 2024/0346028 A1 · Workflow for Generating Synthetic Data based on a Relational Database

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

- Number: US 2024/0346028 A1
- Document ID: US20240346028A1
- Status: Published application
- Kind: A1
- Application number: 18/135,012
- Filed: 2023-04-14
- Published: 2024-10-17
- Earliest claimed: 2023-04-14
- Assignees: Nirvaha Corporation
- Applicants: Nirvaha Corporation
- Inventors: Ramesh Parameswaran
- Web page: https://patentgrep.com/patent/US20240346028A1

## CPC

- G06F 16/24575: {using context}
- G06F 16/2456: {Join operations}
- G06F 16/2462: {Approximate or statistical queries}
- G06F 16/248: Presentation of query results
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system generates data based on a database system, for example, a production database system. The system receives a data bias specification describing characteristics of the data being generated. The system identifies paths of database tables from the database system and executes database queries that join tables in the path. The system determines an initial path to generate a set of records. The system adds additional records to the set of records by identifying new paths and executing queries that join the tables of the new paths. The new paths include tables that were previously processed and create new versions of data for these tables. The database queries are generated so that the extracted data conforms to the data bias specification. The system uses the extracted dataset as training data for generating data.

## Claims

### Claim 1

A computer-implemented method comprising:
receiving a request to generate data based on a source database system having a schema comprising database tables and relationships between database tables;
receiving a data bias specification describing characteristics of the data being generated, the data bias specification based on at least a database table of the source database system;
determining a target size of an extracted dataset, the extracted dataset configured to store data extracted from the source database system;
initializing a result size parameter; and
repeating one or more times:
initializing the extracted dataset to a set of records selected from a subset of database tables of the source database system, the set of records selected based on the data bias specification, wherein a size of the set of records is determined based on the result size parameter;
updating the extracted dataset based on database tables other that the subset of database tables;
determining whether the size of the extracted dataset is below the target size; and
responsive to determining that the size of the extracted dataset is below the target size, increasing the result size parameter.
generating additional data conforming to the data bias specification based on the extracted data set.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the data bias specification specifies that a particular statistic of the database table in the extracted dataset should be within a threshold of the particular statistic of a corresponding database table in the source database system.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein the data bias specification describes statistics of the extracted dataset in terms of a column of a database table of the source database system, the statistics representing one or more of a frequency, a standard deviation, or a histogram based on data stored in the column of the database table.

### Claim 4 (depends on 3)

The computer-implemented method of claim 3, wherein the data bias specification specifies that generated data should have a particular set of values of a column of a database table.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, wherein a first database table has a relationship to a second database table if the first database table has a foreign key based on the second database table.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein the target size represents an expected number of records of a particular database table in the extracted dataset, and wherein determining that the size of the extracted dataset is below the target size comprises determining whether a number of records of the particular database table in the extracted dataset is below the target size.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, wherein the result size parameter is increased by a factor based on a number of records of the particular database table in the extracted dataset compared to the target size.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, further comprising:
using the extracted dataset as training data for generating additional data.

### Claim 9

A non-transitory computer readable storage medium comprising stored instructions that when executed by one or more computer processors, cause the one or more computer processors to:
receive a request to generate data based on a source database system having a schema comprising database tables and relationships between database tables;
receive a data bias specification describing characteristics of the data being generated, the data bias specification based on at least a database table of the source database system;
determine a target size of an extracted dataset, the extracted dataset configured to store data extracted from the source database system;
initialize a result size parameter; and
repeat one or more times:
initialize the extracted dataset to a set of records selected from a subset of database tables of the source database system, the set of records selected based on the data bias specification, wherein a size of the set of records is determined based on the result size parameter;
add to the extracted dataset, other records extracted from database tables other that the subset of database tables, the other records related to the set of records based on relationships between database tables;
determine whether the size of the extracted dataset is below the target size; and
increase the result size parameter is the size of the extracted dataset is below the target size.

### Claim 10 (depends on 9)

The non-transitory computer readable storage medium of claim 9, wherein the data bias specification specifies that a particular statistic of the database table in the extracted dataset should be within a threshold of the particular statistic of a corresponding database table in the source database system.

### Claim 11 (depends on 9)

The non-transitory computer readable storage medium of claim 9, wherein the data bias specification describes statistics of the extracted dataset in terms of a column of a database table of the source database system, the statistics representing one or more of a frequency, a standard deviation, or a histogram based on data stored in the column of the database table.

### Claim 12 (depends on 11)

The non-transitory computer readable storage medium of claim 11, wherein the data bias specification specifies that generated data should have a particular set of values of a column of a database table.

### Claim 13 (depends on 9)

The non-transitory computer readable storage medium of claim 9, wherein a source database table has a relationship to a target database table if the source database table has a foreign key based on the target database table.

### Claim 14 (depends on 9)

The non-transitory computer readable storage medium of claim 9, wherein the target size represents an expected number of records of a particular database table in the extracted dataset, and wherein determining that the size of the extracted dataset is below the target size comprises determining whether a number of records of the particular database table in the extracted dataset is below the target size.

### Claim 15 (depends on 14)

The non-transitory computer readable storage medium of claim 14, wherein the result size parameter is increased by a factor based on a number of records of the particular database table in the extracted dataset compared to the target size.

### Claim 16 (depends on 9)

The non-transitory computer readable storage medium of claim 9, further comprising:
using the extracted dataset as training data for generating additional data.

### Claim 17

A computer system comprising:
one or more computer processors; and
a non-transitory computer readable storage medium comprising stored instructions that when executed by one or more computer processors, cause the one or more computer processors to:
receive a request to generate data based on a source database system having a schema comprising database tables and relationships between database tables;
receive a data bias specification describing characteristics of the data being generated, the data bias specification based on at least a database table of the source database system;
determine a target size of an extracted dataset, the extracted dataset configured to store data extracted from the source database system;
initialize a result size parameter; and
repeat one or more times:
initialize the extracted dataset to a set of records selected from a subset of database tables of the source database system, the set of records selected based on the data bias specification, wherein a size of the set of records is determined based on the result size parameter;
add to the extracted dataset, other records extracted from database tables other that the subset of database tables, the other records related to the set of records based on relationships between database tables;
determine whether the size of the extracted dataset is below the target size; and
increase the result size parameter is the size of the extracted dataset is below the target size.

### Claim 18 (depends on 17)

The computer system of claim 17, wherein the data bias specification specifies that a particular statistic of the database table in the extracted dataset should be within a threshold of the particular statistic of a corresponding database table in the source database system.

### Claim 19 (depends on 17)

The computer system of claim 17, wherein the data bias specification describes statistics of the extracted dataset in terms of a column of a database table of the source database system, the statistics representing one or more of a frequency, a standard deviation, or a histogram based on data stored in the column of the database table.

### Claim 20 (depends on 17)

The computer system of claim 17, wherein the target size represents an expected number of records of a particular database table in the extracted dataset, and wherein determining that the size of the extracted dataset is below the target size comprises determining whether a number of records of the particular database table in the extracted dataset is below the target size.
