Question: ASAP! Write-ahead logging is an important way to handle database crash. In the lecture, we have talked about three approaches: undo only, redo only, and


ASAP!

![questions: Figure 2: An Example of Redo/Undo Logging a. [5 points] Can](https://s3.amazonaws.com/si.experts.images/answers/2024/06/665ddee551b4c_941665ddee54a612.jpg)
Write-ahead logging is an important way to handle database crash. In the lecture, we have talked about three approaches: undo only, redo only, and redo/undo. Figure 2 shows the redo/undo approach. Answer the following questions: Figure 2: An Example of Redo/Undo Logging a. [5 points] Can we switch the step (8) and (9) in Figure 2? Explain why. b. [5 points] Can we switch the step (9) and (10) in Figure 2? Explain why. c. [10 points] Figure 2 forgets to flush logs when it is committed. Now if you need to add the command of "Flush Log" to indicate that the transaction is committed, where is the earliest step? Choose the answer from the following: (i) after step 9; (ii) after step 10; (iii) after step 11. Explain why. Write-ahead logging is an important way to handle database crash. In the lecture, we have talked about three approaches: undo only, redo only, and redo/undo. Figure 2 shows the redo/undo approach. Answer the following questions: Figure 2: An Example of Redo/Undo Logging a. [5 points] Can we switch the step (8) and (9) in Figure 2? Explain why. b. [5 points] Can we switch the step (9) and (10) in Figure 2? Explain why. c. [10 points] Figure 2 forgets to flush logs when it is committed. Now if you need to add the command of "Flush Log" to indicate that the transaction is committed, where is the earliest step? Choose the answer from the following: (i) after step 9; (ii) after step 10; (iii) after step 11. Explain why
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
