3k views

Consider the following two statements about database transaction schedules:

1. Strict two-phase locking protocol generates conflict serializable schedules that are also recoverable.
2. Timestamp-ordering concurrency control protocol with Thomas’ Write Rule can generate view serializable schedules that are not conflict serializable

Which of the above statements is/are TRUE?

1. I only
2. II only
3. Both I and II
4. Neither I nor II

edited | 3k views

1. Strict 2PL allows only schedules whose precedence graph is acyclic i.e. schedule is Conflict Serial. In 2PL, transactions do not release exclusive locks until the transaction has committed or aborted i.e. schedule is recoverable.
2. Time stamp ordering schedule with Thomas write rule generate View serial schedule with BLIND WRITE. Because of BLIND WRITE it won't be Conflict Serial.

So, Option C - both are true

by Veteran (60.8k points)
edited
0
sir, for first option, all those are recoverable too ?
+2
2PL only releases locks when a transaction ends. It prevents a transaction from accessing a database object that was modified by a prior transaction that aborts.
+1
Time Stamp with Thomas Write rule means RW and WR conflict will not be there.That means view serializability?
0
Isn't the case that if a schedule satisfy any 2PL it is a conflict  serialize schedule?
0
If a schedule is not serializeable then it cannot be 2PL.
+1
"Because of BLIND WRITE it won't be Conflict Serial."


Transaction having Blind write then it will not be CS?how?

T1         T2

R(A)

W(A)

W(B)

0

@user2525 aren't all view serializable schedules-- conflict serializable?
then how b can be true?

0

@manisha11

all confilict serializable schedules are view serializable.

0

Because of BLIND WRITE, it won't be Conflict Serial.

I think this statement is incorrect.

In strict 2PL, a transaction T does not release any of its exclusive (write) locks until after it commits or aborts.
Hence, no other transaction can read or write an item that is written by T unless T has committed, leading to a strict schedule for recoverability.
(Ref: Fundamentals of Database Systems by Elmasri and Navathe, 7e Pg. No. 789)

By ignoring the write, Thomas write rule allows schedules that are not conflict serializable but are nevertheless correct.
Those non-conflict-serializable schedules allowed satisfy the definition of view serializable schedules.
(Ref: Database System Concepts by Silberschatch, Korth and Sudarshan, 6e Pg No. 686)

by Active (1.2k points)

A strict 2PL protocol has both a growing phase and a shrinking phase. In the growing phase, it acquires locks; in the shrinking phase, it only releases shared locks. The exclusive locks are released after the transaction commits.

=> There can be no dirty reads by other transactions.

=> No cascading rollbacks or aborts.

=> recoverable.

The basic timestamp ordering protocol enforces conflict serialisability.

Thomas write rule enforces view serialisability. It does so by ignoring the blind writes. The blind writes are meaningless operations that prevent a serial to be conflict serialisable; but by ignoring them, we can make them view serialisable.

Hence, both are true.

Option C

by Loyal (6.3k points)