The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+1 vote
I)All schedules that are allowed under 2PL are also allowed under Timestamp?? Is vice versa true??

II)Plz explain by giving example. I have read that there are schedules that are allowed under 2PL but not under Timestamp and vice versa, but need example. For schdeules allowed under timestamp but not under 2PL is understable bcoz of view serializable nature of timestamp, but how a 2PL schedule not allowed under testamp??

III) Are there conflict serializable schedules that are not allowed under 2PL?? are there any conflict serializable schedule that are not allowed in Timestamp???

IV) Are all view serializable allowed under Timestamp(Thomas write rule)???

Explanation along with example would be helpful.
asked in Databases by Boss (11.7k points)
retagged by | 550 views

1 Answer

+1 vote
Best answer

1. There  are some schedules which are possible under basic timestamp but not under 2PL and vice-versa.

2. Lets take an example tp prove the first statement.

   Let, TS(T1) = 20   and TS(T2) = 30

   Let, the schedule be:

T1 T2


Now, lets see if this possible under basic timestmp protocol.

W(A) of T2 updates the Write-TS(A) = 30 initially.

Then, T1 requests R(A). 

Now, TS(T1) < Write-TS(A)   and hence, T1 read operation is rejected and T1 is rolled back.

But, this schedule is easily possible under 2PL.

Now, the schedule possible under basic timestamp but not under 2PL: TS(T1) = 20, TS(T2) = 30

T1 T2

3. One ssuch schedule which is conflict serializable but not possible with 2PL is:

T1 T2


2PL scheules $\subseteq$ conflict serializable schedules $\subseteq$ view serializable schedules

Some timestamp schedules that use Thomas' write rule are view serializable but not conflict serializable.

REF: here


answered by Boss (18.4k points)
edited by
Any standard reference for the last diagram ?
Yes, Korth.

Just they have this in words and not using diagram.

But, I can give an example which is allowed in the timestamp protocol but violates 2PL .

On the other hand, your diagram says that All TP are 2PL


@kapil. My mistake. 

From Korth:

There are schedules possible under 2PL but not under timestamp and vice-versa.

I will edit the same.

Btw, could you give the schedule possible under timestamp but not using 2PL for reference?

Got the schedule possible under timestamp but not under 2PL. Posted the same.
@sushant lots of thanks. You solved so many doubts.☺
But I think sushant Thomas write rule allows some scedules that are not conflict serializable but are view serializable.
not conflict but view serializable isnt possible :)
In thomas write rule W-W conflict is not rollbacked bcoz of these some view serializable schedules are allowed even though they are not conflict serializable.
ANy example? I doubt this.

Thomas' write rule makes use of concept used in view serializability(no WAW dependenhcy) but I doubt if it says that it produces view serializable schedules.


You are right. It allows some view serializable schedules which arent conflict serializable

REF: here

Editing the last point :P This was new to me.

+1 It has a good venn diagram at end.

Related questions

+1 vote
2 answers
+1 vote
1 answer
0 votes
0 answers
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,132 questions
53,252 answers
70,509 users