CS245  Winter 2000

Assignment 6
due in class on Tuesday February 22

PROBLEM 1

Do Problem 8.2.2 (b) in textbook.


PROBLEM 2

Do Problem 8.2.5 in textbook.
Consider all 4 cases described in 8.2.4)


PROBLEM 3

Do Problem 8.3.2 (b) in textbook.
(This is just problem 8.2.2 (b) with redo logging.)


PROBLEM 4

Consider the following transaction log from the start of the run of a database
system that is capable of running undo/redo logging with checkpointing:

1)  <START T1>
2)  <T1, A, 49, 20>
3)  <START T2>
4)  <T1, B, 250, 20>
5)  <T1, A, 75, 49>
6)  <T2, C, 35, 20>
7)  <T2, D, 45, 20>
8)  <COMMIT T1>
9)  <START T3>
10) <T3, E, 55, 20>
11) <T2, D, 46, 45>
12) <START CKPT (T2,T3)>
13) <T2, C, 65, 35>
14) <COMMIT T2>
15) <START T4>
16) <T4, F, 100, 20>
17) <T4, G, 111, 20>
18) <COMMIT T3>
19) <END CKPT>
20) <T4, F, 150, 100>
21) <COMMIT T4>

Assume the log entrys are in the format <Tid, Variable, New value, Old value>
What is the value of the data items A, B, C, D, E, F, and G on disk after recovery:

(i) if the system crashes just before line 11 is written to disk?
(ii) if the system crashes just before line 14 is written to disk?
(iii) if the system crashes just before line 15 is written to disk?
(iv) if the system crashes just before line 21 is written to disk?
(v) if the system crashes just after line 21 is written to disk?