hw8_sol

# hw8_sol - CPS216 Data-Intensive Computing Systems Fall 2011...

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CPS216 Data-Intensive Computing Systems - Fall 2011 Exercise 8 (Solutions) Question 1 Suppose a database system reboots after a crash and finds that both A and B on disk have the value 10. The log is found to be: <START T1> <START T2> <T1, A, 5> <COMMIT T1> <T2, B, 5> <T2, A, 15> [CRASH] 1. If the system is using UNDO logging, then give the initial state of the database before T1 and T2 began executing (i.e., what were the initial values of A and B on the disk?). 2. If the system is using UNDO logging, then what will be the final state of the database after recovery (i.e., what will be the values of A and B on the disk after the recovery process has finished?). 3. If the system is using REDO logging, then give the initial state of the database before T1 and T2 began executing (i.e., what were the initial values of A and B on the disk?). 4. If the system is using REDO logging, then what will be the final state of the database after recovery (i.e., what will be the values of A and B on the disk after the recovery process has finished?). Solution 1. A=5, B=5; As the Undo logging stores the initial values, A and B will have the values of the first entry in the log. 2. A=15, B=5; During the recovery, only the uncommitted T2 will be undone. 3. A=10, B=10; Since Redo logging stores the new values and no log contained the final disk value of 10, it means that the changes of the log were not reflected on the hard disk, i.e. 10 was the initial value.was the initial value....
View Full Document

{[ snackBarMessage ]}

### Page1 / 4

hw8_sol - CPS216 Data-Intensive Computing Systems Fall 2011...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online