August 1997
DB212: DATABASE MANAGEMENT SYSTEMS

QUESTION 3

Total Marks: 20 Marks

Click here to access other questions

SUGGESTED SOLUTIONS
Solutions and allocated marks are indicated in green.
Return to Question 3

3. (a) Consider the following scenario for three users of a database system:
Time User A User B User C
t1 Lock record X Lock record Z
t2 Lock record Y
t3 Request record Y
t4 Request record Z
t5 Request record X
(i) Will the users be able to process their transactions? Explain what will happen. [4]
No, the users will not be able to process their transactions, because deadlock will occur.
[1 mark]
Explanation of how deadlock occurs
[3 marks]
(ii) Describe two ways of managing the above situation. [4]
deadlock prevention; [1]
explanation [1]
[2 marks]
deadlock resolution; [1]
explanation [1]
[2 marks]
(b) Consider the following scenario, showing the timing of various transactions, leading up to a system failure:
tc represents the time of the last checkpoint,and tf represents the time of the system failure.
(i) When the system failure occurs, how many transactions need to be rolled back? Explain your answer. [4]
only transactions T3 and T5 need to be rolled back
[1 mark]
Explanation of why
[3 marks]
(ii) Explain what is meant by database recovery. [2]
restoring a database quickly and accurately after loss or damage.
[2 marks]
(iii) Describe three facilities which a DBMS might provide to aid recovery. [6]
backup facility
journaling facility
checkpoint facility
For each facility: one mark for identification, and one for description.
[6 marks]