Maintaining and reconstructing the history of database content modified by a series of events
AssigneeReuters Limited
InventorsDavid Rozenshtein, Sandip K. Mehta
Life of this patent
Estimating the term…
Abstract
A method and a system for maintaining the history of database content when the database is modified by a sequence of events, where each event may be one of a load or a load retraction, is provided. The inventive system and method can reconstruct the state of a database as it existed at a discrete time between two successive historical events without repeating each event in the historical event sequence. A table containing deleted row information and a table containing historical information are maintained as the target table is updated to more quickly recreate historical states of the target table.
Claims15
A method of undoing changes made to the content of at least one database, comprising the steps of:
- (1) storing data in a database;
- (2) performing a plurality of loads to said database, wherein the load data comprises a load table and the database comprises a target table, and wherein the database table rows and the load table rows are correlated via a primary key;
- and
- (3) undoing at least one of said plurality of loads,
- wherein the resulting content of the database reflects the data as if the undone load had not been performed, and
- wherein performing a load in step (2) comprises the steps of:
- i. inserting rows into the target with new key values;
- ii. updating rows in the target table with existing key values;
- and
- iii. deleting rows from the target table when a row's key value does not exist in the load table,
- wherein during step (2) i., when inserting a row with a primary key which at some point in the past was deleted prior to said load, those columns for which the load does not contain data are set to the values that they had when the row was last deleted.
A system for undoing changes made to the content of at least one database, comprising:
- a processor;
- and
- a memory;
- wherein in the memory is stored a database and computer readable instructions such that when the computer readable instructions are executed by the processor the system is adapted to perform the steps of:
- (1) storing data in a database;
- wherein during step (2) i., when inserting a row with a primary key which at some point in the past was deleted prior to said load, those columns for which the load does not contain data are set to the values that they had when the row was last deleted.
A computer readable medium storing computer readable instructions that, when executed by a processing unit, cause a data processing device to undo changes made to the content of at least one database by performing the steps of:
- (1) storing data in a database;
- (2) performing a plurality of loads to said database, wherein the load data comprises a load table and the database comprises a target table, and wherein the database table rows and the load table rows are correlated via a primary key;
- and
- (3) undoing at least one of said plurality of loads;
- wherein the resulting content of the database reflects the data as if the undone load had not been performed, and
- wherein performing a load in step (2) comprises the steps of:
- i. inserting rows into the target with new key values;
- ii. updating rows in the target table with existing key values;
- and
- iii. deleting rows from the target table when a row's key value does not exist in the load table
- wherein during step (2) i., when inserting a row with a primary key which at some point in the past was deleted prior to said load, those columns for which the load does not contain data are set to the values that they had when the row was last deleted.
- wherein, subsequent to step (3), the resulting content of the database reflects the data as if the undone load had not been performed and, subsequent to step (4), the resulting content of the database reflects the data as if the one of said plurality of loads had been performed.
Dependencies are inferred from the claim text.