
Distributed Recovery Management
■
159
Example 10.1
Let us consider a banking transaction T1 that transfers $1,000 from account A to account B, where
the balance of account A is $5,000 and the balance of account B is $2,500 before the transaction
starts. Using immediate modifi cation recovery technique, the following information will be written
into the database log and into the permanent database to recover from a failure.
Main Memory Database Log Permanent Database
read(A, ai) <T1, start> A = 5000, B = 2500
ai = ai − 1000
write(A, ai) <T1, update, A, 5000, 4000> A = 4000, B = 2500
read(B, bi)
bi = bi + 1000
write(B, bi) <T1, update, B, 2500, ...