Propagating tables while preserving cyclic foreign key relationships
First Claim
Patent Images
1. A method for propagating a plurality of database tables with cyclic foreign keys without permanently removing the cyclic foreign keys, the method comprising:
- a computer identifying a first source database table 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;
the computer creating a first target database table;
the computer copying said first source database table to said first target database table, the copying comprising replacing all cyclic foreign keys referencing said second source database table with “
NULL”
;
the computer iterating through the plurality of records of said cyclic member table in reverse order; and
the computer updating said first target database table with the cyclic foreign keys referencing the second source database table from the first source database table.
0 Assignments
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.
27 Citations
6 Claims
-
1. A method for propagating a plurality of database tables with cyclic foreign keys without permanently removing the cyclic foreign keys, the method comprising:
-
a computer identifying a first source database table 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; the computer creating a first target database table; the computer copying said first source database table to said first target database table, the copying comprising replacing all cyclic foreign keys referencing said second source database table with “
NULL”
;the computer iterating through the plurality of records of said cyclic member table in reverse order; and the computer updating said first target database table with the cyclic foreign keys referencing the second source database table from the first source database table. - View Dependent Claims (2)
-
-
3. A computer system for propagating a plurality of database tables with cyclic foreign keys without permanently removing the cyclic foreign keys, the computer system comprising:
-
one or more processors, and one or more computer readable memories; computer program instructions, stored on at least one of the one or more computer readable memories for execution by at least one of the one or more processors, to identify a first source database table 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; computer program instructions, stored on at least one of the one or more computer readable memories for execution by at least one of the one or more processors, to create a first target database table; computer program instructions, stored on at least one of the one or more computer readable memories for execution by at least one of the one or more processors, to copy said first source database table to said first target database table, wherein the computer program instructions to copy said first source database table to said first target database table comprise computer program instructions to replace all cyclic foreign keys referencing said second source database table with “
NULL”
;computer program instructions, stored on at least one of the one or more computer readable memories for execution by at least one of the one or more processors, to iterate through the plurality of records of said cyclic member table in reverse order; and computer program instructions, stored on at least one of the one or more computer readable memories for execution by at least one of the one or more processors, to update said first target database table with the cyclic foreign keys referencing the second source database table from the first source database table. - View Dependent Claims (4)
-
-
5. A computer program product for propagating a plurality of database tables with cyclic foreign keys without permanently removing the cyclic foreign keys, the computer program product comprising:
-
one or more computer readable memories; computer program instructions, stored on at least one of the one or more computer readable memories, to identify a first source database table 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; computer program instructions, stored on at least one of the one or more computer readable memories, to create a first target database table; computer program instructions, stored on at least one of the one or more computer readable memories, to copy said first source database table to said first target database table, wherein the computer program instructions to copy said first source database table to said first target database table comprise computer program instructions to replace all cyclic foreign keys referencing said second source database table with “
NULL”
;computer program instructions, stored on at least one of the one or more computer readable memories, to iterate through the plurality of records of said cyclic member table in reverse order; and computer program instructions, stored on at least one of the one or more computer readable memories, to update said first target database table with the cyclic foreign keys referencing the second source database table from the first source database table. - View Dependent Claims (6)
-
Specification