in Databases
1,228 views
1 vote
1 vote
How 2PL  guarenteed serializability? I  think conflict serializability is not guarenteed for 2PL. But may be view serializable Plz explain it
in Databases
by
1.2k views

4 Comments

this not 2PL therefore it may or may not Conflict....
0
0
Plz tell me

1)Is it conflict serialzable or not?

2)why r u it is not 2PL?

because, it has more than one growing and more than one shrinking phase??
0
0

why it is not 2PL?

in 2PL, there is no lock issued after one lock is released in same transaction...

in your example, for T1, after releasing lock on Y, you are again acquiring lock on X, this Violates 2PL.

 

Is it conflict serializable or not?

 

There is loop exist btw T1 and T2 ===> it is not conflict serializable

 

0
0

1 Answer

4 votes
4 votes
  • If a schedule is view then it must be guraenteed for serializability.

  •  if a schedule is conflict then it also a view . So its guraenteed for serilixability.

  • But if a schedule is not conflict the. We can not say about view. So it may or may not be serializable .

  • In 2PL it is guranteed of conflict schedule.

  • Becz in 2PL schedule are in growing and shrinking phase. So precedence graph never contain cycle . 

  • If precedence graph have no cycle then it must be a conflict.

  • If it is conflict then it is also view. Which is guranteed of serializability.

  • 2PL is more strict then conflict.

  • If a schedule is in conflict then it may or may not be in 2PL.

  • But if schedule is in 2PL Then it must be guranteed of conflict.

4 Comments

if only view serializable, Can we say it serializable??

Say for

 r1(Aw2(A) commit2, w1(Aw3(A) commit3, commit1

what will be ur answer? 

0
0
Yes if a schedule is view then it guranted of serializable.
1
1
try the upper example
0
0
This schedule is view . So it is serializable
1
1

Related questions