SAP liveCache databases use undo log entries to enable consistent views of the data. The following example shows how two transactions simultaneously can have consistent views of the same data record.
Consistent views are only available for SAP liveCache databases. In SAP MaxDB databases, you configure transaction consistency using the isolation level (see Isolation Level).
Transaction T1 accesses data record 3600 for the first time in table CUSTOMER and reads the value Smiht as the name. Transaction T1 does not lock the data record, however.
Transaction T2 corrects the name Smiht to Smith in data record 3600. Transaction T2 is completed with a COMMIT.
Transaction T1 accesses data record 3600 again and first checks in the history file whether a different transaction has changed data record 3600 since it was first read.
Because the data record was changed in the meantime by transaction T2, transaction T1 uses the undo log entries for transaction T2 to obtain the same result for the second read as for the first read. Without the undo-log entries, transaction T1 would receive a different result each time it read data record 3600.
The garbage collectors do not delete the undo log entries from transaction T2 until transaction T1 is ended with a COMMIT.