August
1997 QUESTION 3 Total Marks: 20 Marks |
Click here to access other
questions
SUGGESTED SOLUTIONS |
3. | (a) Consider the following scenario for three users of a database system: | |||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
(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] |