Databases System. The complete book. Exercise 17.3.3. The following is a sequenc
ID: 3826106 • Letter: D
Question
Databases System. The complete book. Exercise 17.3.3. The following is a sequence of redo logging records written by two transactions T and U:
< START T>; <T, A, 10>; < START U>; <U, B, 20>; <T, C, 30>; <U, D, 40>; <C0MMIT U>; < T ,E , 50>; <C0MMIT T>
The question: Describe the action of the recovery manager, including changes to both disk and the log, if there is a crash and the last log record to appear on disk is:
(a) < START U> (b) <C0MMIT U> (c) < T ,E , 50> (d) <C0MMIT T>
[ Note to the Expert: Please follow the specific instructions provided, please do not answer anything if you are not sure of your complete answer. Otherwise, I will fail the class and I cannot afford it again. Please write in understandable English. Thank you so very much. ]
please do not forget part b <C0MMIT U>
Explanation / Answer
The Recovery Manager guarantees Atomicity & Durability. Redo rule: before commit, new values it wrote must be in the stable storage (DB or log) These 2 transaction are mutually exclusive and has no dependency on each other So if one transaction is committed,it doesn;t effect the other.
a) Crash and the Log has <START U>
========================================
On the disk: Nothing is written
On the log : 3 incidents are records
1. < START T>;
2. <T, A, 10>;
3. < START U>;
*********************************************************************************
b)<C0MMIT U>
==============================================
On the disk:
1. <U, B, 20>;
2. <U, D, 40>;
=========================================
On the log : Below incidents are records ( Redo rule: before commit, new values it wrote must be in the stable storage (DB or log)
1. < START T>;
2. <T, A, 10>;
3. < START U>;
4. <U, B, 20>;
5. <T, C, 30>;
6. <U, D, 40>;
7. <C0MMIT U>;
*******************************************************************************
c) < T ,E , 50>;
On the disk:
1. <U, B, 20>;
2. <U, D, 40>;
On the log : Below incidents are records ( Redo rule: before commit, new values it wrote must be in the stable storage (DB or log)
1. < START T>;
2. <T, A, 10>;
3. < START U>;
4. <U, B, 20>;
5. <T, C, 30>;
6. <U, D, 40>;
7. <C0MMIT U>;
8.< T ,E , 50>;
********************************************************************************************
d) <C0MMIT T>
On the disk:
1. <T, A, 10>;
2. <U, B, 20>;
3. <T, C, 30>;
4. <U, D, 40>;
5. < T ,E , 50>;
On the log : Below incidents are records ( Redo rule: before commit, new values it wrote must be in the stable storage (DB or log)
On the log :
1. < START T>;
2. <T, A, 10>;
3. < START U>;
4. <U, B, 20>;
5. <T, C, 30>;
6. <U, D, 40>;
7. <C0MMIT U>;
8.< T ,E , 50>;
9. <C0MMIT T>
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.