Method and system for a generic metadata-based mechanism to migrate relational data between databases
First Claim
1. A method for migrating data between a first database and a second database, the method comprising the steps of:
- determining, by a processing unit in a computer, dependencies among a plurality of tables in the first database;
storing the determined dependencies to indicate the table dependencies;
retrieving metadata from the first database, wherein the metadata includes definitions for tables in the first database;
storing the retrieved metadata;
reading data from tables in the first database using a plurality of read operations, wherein the read operations are structured in accordance with the retrieved metadata, and wherein the read operations are in an order indicated by the determined dependencies; and
writing data to the second database using a plurality of write operations, wherein the write operations are in an order indicated by the determined dependencies.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and system for migrating data between databases is provided. Metadata is obtained from a source database and used to determine the manner in which the data within the source database should be migrated to a target database. The metadata provides a mechanism for structuring queries to retrieve the data within the source database in a generic manner, thereby providing a generic determination of the structure of the data to be migrated. The dependencies among tables in the source database are discovered, thereby providing an order to the migration operations to be performed when migrating the data. This order ensures that the data can be migrated correctly in the presence of referential integrity (foreign key) constraints. In addition, custom mapping operations may be performed during the migration operations so that the data from the source database is modified before writing the data to the target database.
127 Citations
6 Claims
-
1. A method for migrating data between a first database and a second database, the method comprising the steps of:
-
determining, by a processing unit in a computer, dependencies among a plurality of tables in the first database; storing the determined dependencies to indicate the table dependencies; retrieving metadata from the first database, wherein the metadata includes definitions for tables in the first database; storing the retrieved metadata; reading data from tables in the first database using a plurality of read operations, wherein the read operations are structured in accordance with the retrieved metadata, and wherein the read operations are in an order indicated by the determined dependencies; and writing data to the second database using a plurality of write operations, wherein the write operations are in an order indicated by the determined dependencies. - View Dependent Claims (2, 3, 4, 5, 6)
-
Specification