# US 11,442,939 B2 · Configurable and incremental database migration framework for heterogeneous databases

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

- Number: US 11,442,939 B2
- Document ID: US11442939B2
- Status: Granted
- Kind: B2
- Application number: 17/075,893
- Filed: 2020-10-21
- Published: 2021-04-15
- Granted: 2022-09-13
- Earliest claimed: 2016-03-30
- Assignees: Groupon, Inc.
- Applicants: Groupon, Inc.
- Inventors: Azmath Mohamad; Chirag Modi; Phani Kumar Bhogaraju
- Web page: https://patentgrep.com/patent/US11442939B2

## CPC

- G06F 16/24554: {Unary operations; Data partitioning operations}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 16/214: {Database migration support}
- G06F 16/258: {Data format conversion from or to a database}
- G06F 16/86: {Mapping to a database}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Various methods are provided for facilitating heterogeneous database migration. One example method may comprise accessing a migration configuration file, the migration configuration file comprising information indicative of at least a source database type of a source database, connection information of accessing the source database, a destination database type of a destination database, and connection information for accessing the destination database, generating configuration data based on the source database type and the destination database type to generate a mapping of a source database table stored within the source database to a destination database table stored within the destination database, and generating a query for execution on the source database enabling data migration from the source database to the destination database.

## Claims

### Claim 1

An apparatus for facilitating heterogeneous database migration, the apparatus comprising at least one processor and at least one memory including computer program code, the at least one memory and the computer program code configured to, with the processor, cause the apparatus to at least:
generate each of a plurality of queries needed to facilitate the heterogeneous database migration, each query of the plurality of queries being a function of a source database type and a destination database type, and wherein each query is directed to a particular combination of a particular source database and a particular destination database,
wherein generation of the plurality of queries comprises:
analyzing the particular source database and the particular target database to produce configuration data, the configuration data used for generating a mapping to enable the migration of at least one table, or portion thereof, from the particular source database to the particular target database;
wherein generation of the mapping comprises:
for each of the plurality of destination database tables, identify one or more particular source database tables and particular columns of each of the one or more particular source database tables from which the source data will be migrated;
for each of the identified one or more particular source database tables and particular columns of the one or more particular source database tables from which the source data will be migrated, determine, based on the source database type and the destination database type, determine at least one particular function of a plurality of functions defined in the utility library to call, as able to manipulate particular information stored as the source data of the source database type in the one or more particular source database tables and particular columns for migration to the destination database table as the destination database type; and
apply each of the determined functions for supporting data migration from the one or more particular source database tables and particular columns of the one or more particular source database tables, each of the one or more different functions configured for supporting data migration from at least one of the one or more particular source database tables and particular columns of the one or more particular source database tables.

### Claim 2 (depends on 1)

The apparatus according to claim 1, wherein the at least one memory and the computer program code are further configured to, with the processor, cause the apparatus to:
generate a migration configuration file by receiving connection information for accessing each of the one or more source databases, receiving connection information for accessing each of one or more destination databases, and confirming connectivity to each of the one or more source databases and each of the one or more destination databases,
wherein the migration configuration file comprises information indicative of at least the particular source database type of the one more source databases, connection information of accessing each particular source database, a destination database type of each particular destination database of the one more destination databases, and connection information for accessing each particular destination database, and
wherein the source database type comprises source data of a first type and the destination database type specifies source data of a second type, wherein the first type is different from the second type.

### Claim 3 (depends on 1)

The apparatus according to claim 1, wherein the at least one memory and the computer program code are further configured to, with the processor, cause the apparatus to:
generate a utility library to define functions for utilization in migration configuration mapping, including functions for manipulating field values and manipulating data values stored in each of a plurality of source database tables and any data exchange formats in advance of causing storage of data in each of a plurality of destination database tables.

### Claim 4 (depends on 1)

The apparatus according to claim 1, wherein the at least one memory and the computer program code are further configured to, with the processor, cause the apparatus to:
execute each of a plurality of queries to extract data;
frame the data into an insert format; and
cause storage of the data, in the insert format, in the destination database.

### Claim 5 (depends on 4)

The apparatus according to claim 4, wherein the at least one memory and the computer program code configured for framing the query is further configured to, with the processor, cause the apparatus to:
call a function for manipulating data values stored in the source database table or any data exchange formats in advance of causing storage of the data in the destination database table.

### Claim 6 (depends on 1)

The apparatus according to claim 1, wherein the at least one memory and the computer program code configured for framing the query is further configured to, with the processor, cause the apparatus to:
maintain, during migration, referential integrity by creating a temporary table configured to maintain a relation between a primary key in the source database table and a foreign key in the destination database table.

### Claim 7 (depends on 1)

The apparatus according to claim 1, wherein the at least one memory and the computer program code configured for framing the query is further configured to, with the processor, cause the apparatus to:
apply a limit to a number of parallel migrations to increase a speed of the migration.

### Claim 8

A method for facilitating heterogeneous database migration, the method comprising:
generating each of a plurality of queries needed to facilitate the heterogeneous database migration, each query of the plurality of queries being a function of a source database type and a destination database type, and wherein each query is directed to a particular combination of a particular source database and a particular destination database,
wherein generation of the plurality of queries comprises:
analyzing the particular source database and the particular target database to produce configuration data, the configuration data used for generating a mapping to enable the migration of at least one table, or portion thereof, from the particular source database to the particular target database;
wherein generation of the mapping comprises:
for each of the plurality of destination database tables, identifying one or more particular source database tables and particular columns of each of the one or more particular source database tables from which the source data will be migrated;
for each of the identified one or more particular source database tables and particular columns of the one or more particular source database tables from which the source data will be migrated, determine, based on the source database type and the destination database type, determining at least one particular function of a plurality of functions defined in the utility library to call, as able to manipulate particular information stored as the source data of the source database type in the one or more particular source database tables and particular columns for migration to the destination database table as the destination database type; and
applying each of the determined functions for supporting data migration from the one or more particular source database tables and particular columns of the one or more particular source database tables, each of the one or more different functions configured for supporting data migration from at least one of the one or more particular source database tables and particular columns of the one or more particular source database tables.

### Claim 9 (depends on 8)

The method according to claim 8, further comprising:
generating a migration configuration file by receiving connection information for accessing each of the one or more source databases, receiving connection information for accessing each of one or more destination databases, and confirming connectivity to each of the one or more source databases and each of the one or more destination databases,
wherein the migration configuration file comprises information indicative of at least the particular source database type of the one more source databases, connection information of accessing each particular source database, a destination database type of each particular destination database of the one more destination databases, and connection information for accessing each particular destination database, and
wherein the source database type comprises source data of a first type and the destination database type specifies source data of a second type, wherein the first type is different from the second type.

### Claim 10 (depends on 8)

The method according to claim 8, further comprising:
generating a utility library to define functions for utilization in migration configuration mapping, including functions for manipulating field values and manipulating data values stored in each of a plurality of source database tables and any data exchange formats in advance of causing storage of data in each of a plurality of destination database tables.

### Claim 11 (depends on 8)

The method according to claim 8, further comprising:
executing each of a plurality of queries to extract data;
framing the data into an insert format; and
causing storage of the data, in the insert format, in the destination database.

### Claim 12 (depends on 11)

The method according to claim 11, wherein framing the further comprises:
calling a function for manipulating data values stored in the source database table or any data exchange formats in advance of causing storage of the data in the destination database table.

### Claim 13 (depends on 11)

The method according to claim 11, wherein framing the further comprises:
maintaining, during migration, referential integrity by creating a temporary table configured to maintain a relation between a primary key in the source database table and a foreign key in the destination database table.

### Claim 14 (depends on 8)

The method according to claim 8, further comprising:
applying a limit to a number of parallel migrations to increase a speed of the migration.

### Claim 15

A computer program product for facilitating heterogeneous database migration, computer program product comprising at least one non-transitory computer-readable storage medium having computer-executable program code instructions stored therein, the computer-executable program code instructions comprising program code instructions for:
generating each of a plurality of queries needed to facilitate the heterogeneous database migration, each query of the plurality of queries being a function of a source database type and a destination database type, and wherein each query is directed to a particular combination of a particular source database and a particular destination database,
wherein generation of the plurality of queries comprises:
analyzing the particular source database and the particular target database to produce configuration data, the configuration data used for generating a mapping to enable the migration of at least one table, or portion thereof, from the particular source database to the particular target database;
wherein generation of the mapping comprises:
for each of the plurality of destination database tables, identifying one or more particular source database tables and particular columns of each of the one or more particular source database tables from which the source data will be migrated;
for each of the identified one or more particular source database tables and particular columns of the one or more particular source database tables from which the source data will be migrated, determine, based on the source database type and the destination database type, determining at least one particular function of a plurality of functions defined in the utility library to call, as able to manipulate particular information stored as the source data of the source database type in the one or more particular source database tables and particular columns for migration to the destination database table as the destination database type; and
applying each of the determined functions for supporting data migration from the one or more particular source database tables and particular columns of the one or more particular source database tables, each of the one or more different functions configured for supporting data migration from at least one of the one or more particular source database tables and particular columns of the one or more particular source database tables.

### Claim 16 (depends on 15)

The computer program product according to claim 15, wherein the computer-executable program code instructions further comprise program code instructions for:
generating a migration configuration file by receiving connection information for accessing each of the one or more source databases, receiving connection information for accessing each of one or more destination databases, and confirming connectivity to each of the one or more source databases and each of the one or more destination databases,
wherein the migration configuration file comprises information indicative of at least the particular source database type of the one more source databases, connection information of accessing each particular source database, a destination database type of each particular destination database of the one more destination databases, and connection information for accessing each particular destination database, and
wherein the source database type comprises source data of a first type and the destination database type specifies source data of a second type, wherein the first type is different from the second type.

### Claim 17 (depends on 15)

The computer program product according to claim 15, wherein the computer-executable program code instructions further comprise program code instructions for:
generating a utility library to define functions for utilization in migration configuration mapping, including functions for manipulating field values and manipulating data values stored in each of a plurality of source database tables and any data exchange formats in advance of causing storage of data in each of a plurality of destination database tables.

### Claim 18 (depends on 15)

The computer program product according to claim 15, wherein the computer-executable program code instructions further comprise program code instructions for:
executing each of a plurality of queries to extract data;
framing the data into an insert format; and
causing storage of the data, in the insert format, in the destination database.

### Claim 19 (depends on 18)

The computer program product according to claim 18, wherein framing the further comprises:
calling a function for manipulating data values stored in the source database table or any data exchange formats in advance of causing storage of the data in the destination database table.

### Claim 20 (depends on 18)

The computer program product according to claim 18, wherein framing the further comprises:
maintaining, during migration, referential integrity by creating a temporary table configured to maintain a relation between a primary key in the source database table and a foreign key in the destination database table.

### Claim 21 (depends on 15)

The computer program product according to claim 15, wherein the computer-executable program code instructions further comprise program code instructions for:
applying a limit to a number of parallel migrations to increase a speed of the migration.
