Method and apparatus for propagating tables while preserving cyclic foreign key relationships
First Claim
1. A computer implemented process for propagating a plurality of database tables with cyclic foreign keys without permanently removing the cyclic foreign keys, the computer implemented process comprising:
- identifying a first source database fable and a second source database table with a cyclic foreign key relationship by iterating through a plurality of records listed in a cyclic member table, that lists the plurality of database tables with cyclic foreign keys;
creating a first target database table for said first source database table to propagate;
copying said first source database table to said first target database table, wherein all cyclic foreign keys referencing said second source database table are replaced with “
NULL”
;
copying said second source database table to a second target database table;
iterating through the plurality of records of said cyclic member table in reverse order; and
updating said first target database table with the cyclic foreign keys referencing the second source database table from the first source database table, wherein the plurality of database tables with cyclic foreign keys are propagated without permanently removing the cyclic foreign keys and without a violation error being thrown.
1 Assignment
0 Petitions
Accused Products
Abstract
The invention meeting the need identified above is the “Enhanced Database Propagation Program” or (EDPP). EDPP uses a cyclic member table that identifies a first source table in a cyclic relationship with a second source table. The first source table, identified in the cyclic member table, propagates first. EDPP replaces all foreign keys with “NULL” in the first target table. After the second source table in the subscription set has propagated to a second target table, EDPP updates first target table with the foreign keys from the first source table.
-
Citations
1 Claim
-
1. A computer implemented process for propagating a plurality of database tables with cyclic foreign keys without permanently removing the cyclic foreign keys, the computer implemented process comprising:
-
identifying a first source database fable and a second source database table with a cyclic foreign key relationship by iterating through a plurality of records listed in a cyclic member table, that lists the plurality of database tables with cyclic foreign keys; creating a first target database table for said first source database table to propagate; copying said first source database table to said first target database table, wherein all cyclic foreign keys referencing said second source database table are replaced with “
NULL”
;copying said second source database table to a second target database table; iterating through the plurality of records of said cyclic member table in reverse order; and updating said first target database table with the cyclic foreign keys referencing the second source database table from the first source database table, wherein the plurality of database tables with cyclic foreign keys are propagated without permanently removing the cyclic foreign keys and without a violation error being thrown.
-
Specification