Consider the following log with the following initial DB items' values :
A= 70, P= 40, Q=105 , and R=30.
1 [Start, T1]
2 [T1, P, 40,50]
3 [T1,R,30,560]
4 [T1,Q,105,300]
5 [T1, Commit]
6 [T8, Start]
7 [T2, Start]
8 [T2,R, 560,77]
9 [T2,P,50,90]
10 [T8, R, 77, 200]
11 [T2, Q, 300, 99]
12 [Checkpoint Active=T2, T8]
13 [T7, Start]
14 [T7,R,200, 44]
15 [T2, Commit]
16 [T9, Start]
17[T9, R, 44, 100]
18 [T6, Start]
19 [T6, A, 70, 97]
20 [T0, Start]
21 [T6,P, 90, 80]
22 [T0, P, 80,32]
23 [T9, Q, 99, 225]
24 [T0, Q, 225, 500]
25[T6, Commit]
26[Checkpoint Active=T7,T8,T9,T0]
27[T7, Q, 500, 17]
28[T7, Commit]
29[T0, Commit]
30[T9,P, 32, 66]
31[T8, Commit]
32 [System Crash]
1) If the Deferred Update recovery technique is used, give the value of database items on disk immediately after the statement 12 has been executed.
2) If the Immediate Update technique is used, give the value of the database items on disk immediately after the statement 31 has been executed.
Note : statement 32 has not been executed yet
3) We will assume that the last log entry -i.e entry number 31 has been recorded in the disk when a crash occurs. Specify the action (Undo, Redo, Ignore) to be taken for each transaction. The recovery technique is the Immediate Update.
Ignore=
Undo=
Redo=
4) Is there a need of cascading rollback? If yes then which else transaction will follow cascading rollback?
5) What are the values of A, P, Q, R after recovery?