C.1 Appendix: Recording DML Changes on the Tracked Table
DML Changes on a Tracked Table Row | Temporary tcrv Table | Blockchain History Table |
---|---|---|
First Insert |
For any row, its very first inserted data (first lifespan) is protected by inserting a dummy row into its associated blockchain history table. This dummy row records the digest over the row's first lifespan. |
|
Update |
The latest version of the row (with the updates to
the columns) now becomes the current lifespan of this tracked
table row and gets recorded in the The beginning SCN of this current lifespan is taken from the commit SCN of the transaction that inserted the new row. The end SCN is infinite. The previous current lifespan is deleted from the
|
The previous current lifespan is inserted into the history table. The beginning SCN of the entry in the history table is the commit SCN of the first transaction that inserted the row, and its end SCN is the commit SCN of the second transaction that updated the row. Based on the current lifespan row in the
Therefore, this new column protects the latest
lifespan row in the |
Delete |
The current lifespan in the |
A new historical lifespan is created in the history
table (indicating that the |