Consider the following log sequence of two transactions on a bank account, with initial balance 12000, that transfer 2000 to a mortgage payment and, then apply a 5% interest
(i) T1 start
(ii) T1 B old = 12000 new = 10000
(ii) T1 M old = 0 new = 2000
(iv) T1 commit
(v) T2 start
(vi) T2 B old = 10000 new = 10500
(vii) T2 commit
Suppose the database system crashed just before log record 7 is written. When the system is restarted, which one statement is true of the recovery procedure?
1
We must redo log record 6 set B to 10500
2
We must undo log record 6 to set B to 10000 and then redo log record 2 and 3
3
We need not redo log records 2 and 3 because transaction T1 has committed
4
We can apply redo and undo operations in arbitrary order because they are idempotent