Implementing Transaction Processing Using Redo Logs
Implementing Transaction Processing Using Redo Logs
An deferred update operation will NOT make the updates immediately to the database
The updates are made after the transaction has completed successfully
When transaction T1 updates the data item X (deferred), but has yet not completed and in the mean time, a transaction T2 reads the
data item X , then T2 will read the OLD value of X
Redo log
A REDO log is a log file that contains information to REDO the effect of transactions
To redo the effect of a transaction is to redo the updates made by the transaction
In order to redo the updates made by the transaction, we save the NEW value of every updated data item !!!
2. [write, TID, X, new_value]: indicates that transaction TID has over-written data item X with the value was
new_value
Operation:
update X (with the new value) - the update is made to the copy in the transaction buffer (NOT to the data in
the database)
Append [write, T, X, new_value] to the REDO log
xxxx
T: x := x - 1000
y := y + 1000
1. When transaction T starts, the transaction processing system writes a start transaction to to log file:
2. Transaction T must read the data item x from disk into its memory buffer
3. To update data on disk , the transaction only update the data item x in its memory buffer
Question:
Answer:
System failure
Access conflict (later)