Assume a database that crashed during execution. Based on the following log, ans
ID: 3834242 • Letter: A
Question
Assume a database that crashed during execution. Based on the following log, answer each of the questions below:
<T1 START>
<T1, A, 3, 4>
<T2 START>
<T2, B, 1, 2>
<T1 COMMIT>
<CHECKPOINT {T2}>
<T3 START>
<T2, B, 1>
<T3, C, 5, 6>
<T2 ABORT>
<T4 START>
<T4, A, 4, 5>
<T4 COMMIT>
*crash*
(a) (10 points) What transactions were running at the time of crash?
(b) (10 points) What transactions will the system UNDO?
(c) (10 points) Show the steps of the REDO pass.
(d) (10 points) Show the steps of the UNDO pass.
Explanation / Answer
1)
What transactions were running at the time of crash?
Transection T4 and t3
2)
What transactions will the system UNDO?
Transection T3 is started but neveer commmited or aborted that's why it is put in Undo list
3) and 4)
teps for the UNDO operation are
If the faulty transaction has done INSERT, the recovery manager deletes the data item(s) inserted.
If the faulty transaction has done DELETE, the recovery manager inserts the deleted data item(s) from the log.
If the faulty transaction has done UPDATE, the recovery manager eliminates the value by writing the before-update value from the log.
Steps for the REDO operation are
If the transaction has done INSERT, the recovery manager generates an insert from the log.
If the transaction has done DELETE, the recovery manager generates a delete from the log.
If the transaction has done UPDATE, the recovery manager generates an update from the log.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.