Chapter 22: Database Recovery Techniques
1
CHAPTER 22: DATABASE RECOVERY TECHNIQUES
Answers to Selected Exercises
22.21 – Suppose that the system crashes before the [read_item,T3,A] entry is written to
the log in Figure 23.1 (b); will that make any difference in the recovery process?
22.22 – Suppose that the system crashes before the [write_item,T2,D,25,26] entry is
written to the log in Figure 23.1 (b); will that make any difference in the recovery process?
22.23 – Figure 23.6 shows the log corresponding to a particular schedule at the point of a
system crash for the four transactions T1, T2, T3, and T4 of Figure 19.4. Suppose that we
use the immediate update protocol with checkpointing. Describe the recovery process from
the system crash. Specify which transactions are rolled back, which operations in the log are
redone and which (if any) are undone, and whether any cascading rollback takes place.
Answer:
First, we note that this schedule is not recoverable, since transaction T4 has read the
committed before the checkpoint and hence is not involved in the recovery.
From Step 2, the operations that are to be undone are:
[write_item,T2,D,25]
[write_item,T3,A,30]
[write_item,T2,B,12]
Note that the operations should be undone in the reverse of the order in which they were
Chapter 22: Database Recovery Techniques
2
[write_item,T4,A,20]
22.24 – Suppose that we use the deferred update protocol for the example in Figure 23.6.
Show how the log would be different in the case of deferred update by removing the
unnecessary log entries; then describe the recovery process, using your modified log.
Assume that only redo operations are applied, and specify which operations in the log are
redone and which are ignored.
Answer:
In the case of deferred update, the write operations of uncommitted transactions are not
The list of committed transactions T since the last checkpoint contains only transaction
T4. The list of active transactions T’ contains transactions T2 and T3.
Only the WRITE operations of the committed transactions are to be redone. Hence, REDO
22.25 – How does checkpointing in ARIES differ from checkpointing as described in Section
23.1.4?