in Databases
2,367 views
2 votes
2 votes
T1 T2 T3
R(X)


W(X)
commit

W(X)
commit





R(X)
commit

 

is this transaction conflict serializable and view serializable?

 

in Databases
by
2.4k views

2 Comments

View Serializable??
0
0
how?
0
0

1 Answer

4 votes
4 votes
Best answer

It is not Conflict Serializable as there is dependency between $T_1$ and $T_2$ in both the directions for conflicting operations (cycle in precedence graph).

For View Equivalence:

  1. If transaction $T_i$ reads initial value of any data item $X$ in one schedule it must do the same in all the equivalent schedules
  2. If transaction $T_i$ writes the final value of any data item $X$ in one schedule, it must do the same in all the view-equivalent schedules. 
  3. If transaction $T_i$ reads data item $X$ written by transaction $T_j$, it must do the same in all the view equivalent schedules

So, the given schedule is not View Serializable as it requires $T_1$ to come before $T_2$ to ensure $T_1$ reads first and $T_2$ to come before $T_1$ to ensure $T_1$ writes last, which is not possible. 

selected by
by

4 Comments

same question is found in my notes where it is also given Not VS and not CS 

0
0
Sorry, I was using the wrong definition for VS - the condition is not to ensure the transaction reading first remaining the same but the value being read must remain the same. So, the given one is not VS - I have edited and added the definition too.
0
0

@Gurdeep Saini

@Arjun Sir,

How you are getting T2$\rightarrow$T1 in polygraph??

This is what I am getting :

$T_{0}$$\rightarrow$ $T_{1}$

$T_{1}$$\rightarrow$ $T_{2}$

$T_{1}$$\rightarrow$ $T_{3}$

$T_{1}$$\rightarrow$ $T_{f}$

$T_{2}$ $\cdots$> $T_{1}$

$T_{3}$ $\cdots$> $T_{2}$

& out of them $T_{2}$ $\cdots$> $T_{1}$ , $T_{3}$ $\cdots$> $T_{2}$ if I consider only $T_{3}$ $\cdots$> $T_{2}$ then I will not get any cycle & which will lead to VSS. 

Please point out my mistake if any.

 

0
0

Related questions

1 vote
1 vote
1 answer
3