1,643 views
5 votes
5 votes
t1                                     t2

w(x)                    

                                         r(x)

w(x)

                                         commit   

commit

 

Why is this not view serializable?

2 Answers

Best answer
9 votes
9 votes
if given schedule is equivalent to anyone of the serial schedule then given schedule is View Serial. for this we are checking 3 conditions as :

 

1. Initial read : No intital read in any Transaction. so T2 -----> T1 not possible.

2. Final Write : Final write should be done by T1. No write operation is T2 so it is allowed to execute eother T1----->T2 or T2 -----> T1 bit T2 ----->T1 not possible as condition of Initial Read. now only option left is T1 ----->T1

3. Write Read sequence : if  T1 --->T2 then T2 reads value of x after second update done by T1. so T1 -----> T2 also not possible.

 

finally not View Serial.
selected by
2 votes
2 votes

View Serializable : Schedule S is view serializable schedule iff some serial schedule S' view equal to given schedule S.

I THINK here no serial schedule is equal to given schedule 

t1                                     t2

w(x): 100+50
w(x):  150+50                 

                                  r(x):200
                                         commit   
commit
but in original transaction it was reading 150 .

if you run t2 first it will read original data which is not equal to given transaction.
so that is why its not View serializable. 

 

Related questions

1 votes
1 votes
1 answer
1
Na462 asked Jan 13, 2019
1,477 views
Consider following Schedule S with data item x :S : W1(X) R2(X) W3(X) R4(X) W5(X) R6(X) W7(X) R8(X) W9(X) R10(X)The number of schedule view equivalent to Schedule S but n...
3 votes
3 votes
3 answers
3
shivangi5 asked Dec 6, 2017
2,862 views
Consider the 2 transactionsT1: R(A) W(A) W(B)T2: R(A) W(A) R(B) W(B)How many view serializable schedules are possible which are not conflict serializable?(A) 0(B) 1(C) 2(...
3 votes
3 votes
2 answers
4