Patent ID: 6567823
Filing Date: 2003-05-20
Classification: G06F,Y10S

Abstract:
A method of change propagation in a migration from at least one source table to a target table in a database management system for a database containing said source table and having a log in which each specific record has a data-independent key enabling the finding of said specific record in the log and where said data-independent key is always larger for newer records than for older records, the method comprising:for supporting a change-propagation process for migrations that use more than one source-table instance for single-table subcondition traceable migrations, for supporting a change-propagation process for fixed environment traceable migrations, for supporting a change-propagation process for fixed environment traceable migrations without relying on a stable version of an optionally changeable source table, or for supporting a change-propagation process for single-table instance migrations without relying on a stable version of an optionally changeable source table, the steps of:(a) deriving from said log of said database containing said source table a last data-independent key representing an immediately previous migration; (b) for a particular migration definition and the respective last data-independent key derived in step (a), for a source table undergoing a change involving a migration, generating a condensed table containing at most two records for a record identifier of each data row which has changed in the source table after the completion of a previous migration or change propagation process, the two records being selected from before and after images of the data row which has changed in the source table or from a before image of a first pair of said images and an after image of a last pair of said images where the same data row is changed a number of times and a respective pair of images are formed with each change; (c) for each source table appearing in said migration definition, eliminating redundant changes and from said migration definition and the condensed table, generating a file containing delete statements, a file containing update statements, an insert table and an ignore file containing instructions to ignore specific rows in a table; (d) thereafter: (d1) implementing deletes based upon the file containing delete statements and updating the target table correspondingly, (d2) implementing updates based upon the file containing update statements and updating the target table correspondingly, (d3) where a single source table is involved in said migration definition and said migration definition does not involve an SQL join step, implementing insert commands contained in said insert table and updating the target table correspondingly, and (d4) where a plurality of source tables are involved in said migration definition and said migration definition includes an SQL join step, joining each insert table generated from one of said plurality of source tables with at least parts of the other source tables of said plurality of source tables based upon the migration definition, the ignore file, the respective source table and the insert table to generate a respective insert statement file; and (e) updating said target table based upon commands in said insert statement file.