摘要 |
A method, apparatus, system, and signal-bearing medium that in an embodiment, store a reason identifier in rows in a database. The reason identifier identifies the most recent change to the rows. The content of the rows that existed prior to the change are stored in journal records. In response to an undo command, the most-recent instance of each record identifier in the records associated with the reason identifier are found in the journal and moved to the database in reverse time sequence order. In an embodiment, a promote operation requests moving the change upwards in a sequence, from a source version to a target version of the database. In response to the promote operation, a determination is made whether rows with the same row identifiers but a different reason identifier exist in a target version of the database, but the different reason identifier is complete. If the determination is false, the different reason identifiers are linked, and a future command that specifies one reason identifier is also performed against the other reason identifier. The rows are copied from the source version to the target version. In an embodiment, in response to a demote operation of a reason identifier from a target version to a source version of the database, a determination is made whether rows with the same row identifiers but a different reason identifier exist in the source version. If the determination is true, the different reason identifiers are linked, and a future command that specifies one reason identifier is also performed against the other reason identifier. The most-recent records in the journal that are associated with the reason identifier are found and the content of the records are moved to the target version of the database in reverse time sequence order.
|