in Databases
1,896 views
1 vote
1 vote
there is a schedule which is allowed in Thomas write rule so it is view serializable. Suppose at a point write operation of an older transaction is ignored. then the same operation will be ignored in its serial order?
in Databases
by
1.9k views

4 Comments

 @aditi19 No, (Time stamp+ Thomas write rule) generates view serializable schedule with blind write.

0
0

@Kushagra गुप्ता

as you said...

  T1.------T2. 

r1(a)  

            w2(a)

w1(a)

here its it's not view serializable ,meaning last write w1(a) is actually happening...

but when you say its allowed under thomas write rule..we ignore w1(a) meaning its not performed at all... IT'S LIKE W1(a) is not even there...like just omitted..

​​​​​​else we would have to roll back unnecessary...

so if it's following Thomas write rule then last w2(a) is virtually ommited and never performed...so it's vss now, view serializable to T1-->T2

 

 

0
0
Is it true that Thomas Write Rule allows only few view serializable schedules or it allows all?

Anyone please clarify.
0
0

1 Answer

1 vote
1 vote

Thomas write rule will guarantee VIEW Serializability as

Suppose you have a schedule S: r1(a) w2(a) w1(a)

suppose you have a Serial Schedule T1T2 i.e. T1 occurs first in the system

T1T2: r1(a) w1(a)      w2(a)

We know that T1T2 is a serial schedule as It preserves its first read as in S so we can clearly see that it is not preserving view Serializability as last write should be of T1 but in this serial schedule it is of T1.

 

Now Thomas write rule comes into picture. as T1 timestamp is less than T2 T1 must have happened before T2. Now its write will be ignored by the system so the schedule now becomes:

 S: r1(a) w2(a) w1(a)  

And our serial schedule as per Thomas write rule will only be T1 T2 (not T2T1)

T1T2: r1(a) w1(a) w2(a)

Just focus on the strike through

Who is making first read and last write to the data items in both the Serial schedule T1T2 and in our schedule S? 

Ans: T1 and T2 respectively

So yes Thomas write rule maintains VIEW SERIALIZABILITY but does not guarantee Conflict Serializability.

Although this explanation will come handy to you in order to solve GATE 2019 question on view and conflict serialisability.

Related questions