【正文】
rds, and maintains a record of update activities on the database. ? When transaction Ti starts, it registers itself by writing a Ti startlog record ? Before Ti executes write(X), a log record Ti, X, V1, V2 is written, where V1 is the value of X before the write, and V2 is the value to be written to X. ? Log record notes that Ti has performed a write on data item Xj Xj had value V1 before the write, and will have value V2 after the write. ? When Ti finishes it last statement, the log record Ti mit is written. 169。Silberschatz, Korth and Sudarshan, Bo Zhou Database System Concepts Immediate DB Modification Recovery Example Below we show the log as it appears at three instances of time. Recovery actions in each case above are: (a) undo (T0): B is restored to 2021 and A to 1000. (b) undo (T1) and redo (T0): C is restored to 700, and then A and B are set to 950 and 2050 respectively. (c) redo (T0) and redo (T1): A and B are set to 950 and 2050 respectively. Then C is set to 600 End of Chapter