# US 2009/0222691 A1 · Data Migration Manager

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

- Number: US 2009/0222691 A1
- Document ID: US20090222691A1
- Status: Published application
- Kind: A1
- Application number: 12/040,543
- Filed: 2008-02-29
- Published: 2009-09-03
- Earliest claimed: 2008-02-29
- Assignees: Red Hat, Inc.
- Inventors: Bill C. Riemers
- Web page: https://patentgrep.com/patent/US20090222691A1

## CPC

- G06F 16/214: {Database migration support}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and apparatus for transactions during a data migration. The transfer of data from an old database to a new database is structured as a set of small transactions. The transactions can be structured in a hierarchy of dependent transactions such that the transactions are nested or similarly hierarchical. A migration manager includes a set of data conversion methods or processes that enable the conversion of data from a format of an old database to that of a new database. The conversion process generates the nested transactions to resolve dependencies between records such as primary and foreign keys. The method and system provides a higher level of granularity in transaction size, providing the ability to transfer records individually and resolve the dependencies in such transactions without requiring a large mapping of an entire data set in the old database to an organization in the new database.

## Claims

### Claim 1

A computer-implemented method comprising:
receiving a record indicator for a first record from a first database to be migrated to a second database;
starting a first transaction to migrate the first record to the second database;
converting the first record to a format compatible with the second database; and
generating a second transaction during the first transaction to migrate a second record related to the first record.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, further comprising:
determining a level of the first transaction; and
migrating constant records in response to determining the first transaction is a top level transaction.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, further comprising:
determining whether the first record is present in the second database; and
mapping records associated with foreign keys of the first record, in response to determining the first record is present in the second database.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, further comprising:
inserting the first record into the second database.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, further comprising:
initiating a rollback of the first transaction in response to an error during the first transaction.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, further comprising:
adding an action to update foreign keys in the first record to a pre-commit queue.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, further comprising:
returning a primary key for the first record upon completion of the first transaction.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, further comprising:
receiving a request to open the transaction; and
converting a primary key to the format of the second database.

### Claim 9

A computer readable storage medium, having instructions stored therein, which when executed, cause a computer to perform a set of operations comprising:
receiving a record indicator for a first record from a first database to be migrated to a second database;
starting a first transaction to migrate the first record to the second database;
converting the first record to a format compatible with the second database; and
generating a second transaction during the first transaction to migrate a second record related to the first record.

### Claim 10 (depends on 9)

The computer readable storage medium of claim 9, having further instructions therein, which when executed, cause the computer to perform a further set of operations, further comprising:
determining a level of the first transaction; and
migrating constant records in response to determining the first transaction is a top level transaction.

### Claim 11 (depends on 9)

The computer readable storage medium of claim 9, having further instructions therein, which when executed, cause the computer to perform a further set of operations, further comprising:
determining whether the first record is present in the second database; and
mapping records associated with foreign keys of the first record, in response to determining the first record is present in the second database.

### Claim 12 (depends on 9)

The computer readable storage medium of claim 9, having further instructions therein, which when executed, cause the computer to perform a further set of operations, further comprising:
inserting the first record into the second database.

### Claim 13 (depends on 9)

The computer readable storage medium of claim 9, having further instructions therein, which when executed, cause the computer to perform a further set of operations, further comprising:
initiating a rollback of the first transaction in response to an error during the first transaction.

### Claim 14 (depends on 9)

The computer readable storage medium of claim 9, having further instructions therein, which when executed, cause the computer to perform a further set of operations, further comprising:
adding an action to update foreign keys in the first record to a pre-commit queue.

### Claim 15 (depends on 9)

The computer readable storage medium of claim 9, having further instructions therein, which when executed, cause the computer to perform a further set of operations, further comprising:
initiating a rollback of the first transaction in response to an error during the first transaction.

### Claim 16 (depends on 9)

The computer readable storage medium of claim 9, having further instructions therein, which when executed, cause the computer to perform a further set of operations, further comprising:
returning a primary key for the first record upon completion of the first transaction.

### Claim 17

A system comprising:
migration manager to manage a migration of data from a source to a target, the migration manager comprising:
a nested transaction manager to handle nested transactions; and
a set of data conversion components to convert a first record from a format of a first database to a format of a second database and generate nested transactions to resolve a data dependency between the first record and a second record.

### Claim 18 (depends on 17)

The system of claim 17, wherein the set of data conversion components include a primary key conversion module to generate a primary key for the first record according to a format of the second database.

### Claim 19 (depends on 17)

The system of claim 17, wherein the set of data conversion components include a foreign key conversion module to generate a foreign key of according to a format of the second database.

### Claim 20 (depends on 19)

The system of claim 19, wherein the set of data conversion components include a map foreign key component to maintain a data structure that tracks the records that have been migrated from the first database to the second database.
