in Unknown Category
821 views
3 votes
3 votes
Is this schedule view serializable ??
R1(x),R1(y),W1(x),R2(y),W3(y),W1(x),R2(y)
in Unknown Category
by
821 views

2 Answers

2 votes
2 votes
Best answer

$\left ( \text{S is conflict serializable} \right ) \Rightarrow \left ( \text{S is view serializable} \right )$

So, check for the precedence graph of this scedule first :

$\Rightarrow$ NOT conflict serializable.

So, we need to check view serializability :

Because of the $T_2\rightarrow T_3$ and $T_3\rightarrow T_2$ conditions need to be satisfied at the same time, no view serial schedule possible.

selected by
by

2 Comments

initially i was also doimg mistake now i got correct .
1
1
0
0
3 votes
3 votes

For view serialisability we check the following :

a) Initial  and updated read of each variable should be done by same transaction for both the non serial schedule and view equal serial schedule..

b) Final write of each variable should also be satisfied..

Keeping in mind the above mentioned points , if we are able to get even a single view serial schedule we can conclude that the given schedule is view serialisable..

So keeping in mind the above points , we find :

Initial(unupdated) read is being performed by T1 , so T1 must come at first compulsorily..

Now there is a write - read pair of W3(Y) and R2(Y) ..From this it follows that T2 must follow T3 and no transaction should come in between as in that case there is a possiblity that the other transaction performs write which is read by T2 which is not desirable as it needs to read from T3 only..

Hence the only possible serial schedule is T1 : T3 : T2..But this is invalidated due to first read of y variable by T2 which is being updated by T3 in view equal serial schedule..

There is no issue of final write here as each of the variables written by exactly one transaction here..Final write would come into picture if there is write on the same variable by more than 1 transaction..

Thus our final view equal schedule for the above non serial schedule is not possible..

So the schedule is not view serialisable..

 

edited by

4 Comments

exactly
0
0
@Habib

" Final write of each variable should be satisfied "

what does this mean? The same transaction must do initial read and final write ??
1
1
Means if say T1 and T2 are performing write operations on a variable say x , and suppose in the given schedule T1 performs the last write operation , meaning T2 then T1 , so in the corresponsding view equal schedule also we have to ensure the same..i.e. T1 performs write after T2 only..

This is possible in a serial schedule only if all T1 operations has to be performed after T2 operations , which is hence done in a serial  manner..
0
0

Related questions

3 votes
3 votes
2 answers
1
air1ankit asked in Databases Oct 9, 2017
552 views
air1ankit asked in Databases Oct 9, 2017
552 views