COMP9315 Final Exam The University of New South Wales
COMP9315 DBMS Implementation
Final Exam
DBMS Implementation
[Instructions] [Notes] [PostgreSQL] [C]
[Q1] [Q2] [Q3] [Q4] [Q5] [Q6] [Q7] [Q8] [Q9]

Question 9 (10 marks)

Consider the following transactions:

T1:  R(X)  R(Y)  W(X)  W(Y)
T2:  W(X)  R(Y)
T3:  R(Y)  R(X)  W(Y)

Note that above is not a schedule; it simply gives the sequence of read/write operations for each transaction. We assume that all transactions eventually commit successfully.

Using the transactions above, answer the following questions:

  1. Add appropriate lock/unlock operations for a two-phase locking strategy.

  2. Give a possible schedule that might arise from executing the transactions defined in part (a).

  3. Add lock/unlock operations which are definitely not based on two-phase locking.

  4. Give a possible schedule that might arise from executing the transactions defined in part (c).

In answering the questions above ...

In other words, use the same kind of notation that is used on pages I-67 and I-69 of the Course Notes.

  • in giving possible schedules, you may use any order of operations that you wish, provided that

  • Show all working.

    Instructions:

    End of Question