Question: Consider the following (partial) schedule in a centralized database system. Assume the initial values of data items A, B, C, D, and E are 10,
Consider the following (partial) schedule in a centralized database system. Assume the initial values of
data items A, B, C, D, and E are 10, 20, 30, 40, and 50, respectively. Assume logging is used for recovery.
For simplicity, we assume each write is immediately written to the database (on disk) (and hence, the
corresponding log record must be written to the stable storage before the database block on disk is written).
Assume the system has crashed right after step 25.

(a) Show the complete log just before the crash.
(b) Which portion of the log is in stable storage when the system crashes?
Why?
(c) When the system is brought back up, what are the recovery actions it performs, and in which order are
the actions performed? Be specific and give the details in the sequence they are performed (for example,
you should say the value of X is restored to V, where an undo is performed corresponding to an entry).
(d) Answer parts (a) through (c) again assuming a checkpoint is taken immediately after step 13.
T2 T3 Ts R(A) R(1B) B B A R(D W(B) R(C) commit 10 12 W(B) 15. commit W(D) R(B) 18 19 20 21 W(B) C+20 E E 20 23. 24 25 commit T2 T3 Ts R(A) R(1B) B B A R(D W(B) R(C) commit 10 12 W(B) 15. commit W(D) R(B) 18 19 20 21 W(B) C+20 E E 20 23. 24 25 commit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
