in Databases edited by
399 views
0 votes
0 votes
Consider the following transaction
 
 T1  T2  T3
 R(A)    
   W(A) commit  
 W(A) commit    
     W(A) commit

Which of the following is TRUE regarding above transaction?
(1) Transaction is view serializable since it has a view-equivalent serial schedule < T1, T2 T3 >
(2) Transaction is view serializable since it has a view-equivalent serial schedule < T1, T3 T2 >
(3) Transaction is view serializable since it has a view-equivalent serial schedule < T3, T2 T1 >
(4) Transaction is not serializable

Your Answer:

3

Correct Answer: 1    Status: incorrect

in Databases edited by
399 views

1 Answer

0 votes
0 votes

Two schedules S1 and S2 are said to be view-equivalent when the following conditions are satisfied:

  1. If the transaction $T_i$ in S1 reads an initial value for object X, so does the transaction $T_i$ in S2.
  2. If the transaction $T_i$ in S1 reads the value written by transaction $T_j$ in S1 for object X, so does the transaction $T_i$ in S2.
  3. If the transaction $T_i$ in S1 is the final transaction to write the value for an object X, so is the transaction $T_i$ in S2.

source: Wikipedia

$T_3$ performs the final write on the data item $A$, thus any view equivalent serial schedule must execute $T_3$ after other two transactions.

From the given options, only (1) propose a serial schedule which has $T_3$ after $T_1$ and $T_2$. Thus, option (1) is right answer.

HTH