Question:

Let \(S\) be the following schedule of operations of three transactions \(T_1, T_2\) and \(T_3\) in a relational database system:
\[ R_2(Y),\; R_1(X),\; R_3(Z),\; R_1(Y),\; W_1(X),\; R_2(Z),\; W_2(Y),\; R_3(X),\; W_3(Z) \] Consider the statements \(P\) and \(Q\) below:
\[ P:\ S \text{ is conflict-serializable.} \] \[ Q:\ \text{If } T_3 \text{ commits before } T_1 \text{ finishes, then } S \text{ is recoverable.} \] Which one of the following choices is correct?

Show Hint

Recoverability requires that a transaction must not commit before the transaction whose data it has read commits.
Updated On: Dec 29, 2025
  • Both \(P\) and \(Q\) are true.
  • \(P\) is true and \(Q\) is false.
  • \(P\) is false and \(Q\) is true.
  • Both \(P\) and \(Q\) are false.
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Check conflict-serializability (Statement \(P\)).
Construct the precedence graph based on conflicting operations:
\[ T_1 \rightarrow T_2 (\text{on } Y), T_1 \rightarrow T_3 (\text{on } X), T_2 \rightarrow T_3 (\text{on } Z) \] The precedence graph is acyclic. Hence, the schedule is conflict-serializable. So, statement \(P\) is true.

Step 2: Check recoverability (Statement \(Q\)).
Transaction \(T_3\) reads \(X\) after it is written by \(T_1\). If \(T_3\) commits before \(T_1\) finishes (and commits), then \(T_3\) commits after reading uncommitted data from \(T_1\). This violates the condition for recoverability. Hence, statement \(Q\) is false.

Step 3: Conclusion.
Therefore, \(P\) is true and \(Q\) is false.

Was this answer helpful?
0
0