The Gateway to Computer Science Excellence
0 votes

Please explain. Use the below transaction.

in Databases by Active (1.5k points) | 187 views
i am thinking is this transaction runs without deadlock under strict 2PL ?

If there is no deadlock ==> it avoid unrepeatable problem.

if deadlock is present ? then what to say ?

1 Answer

0 votes
Any 2 PL if does not cause deadlock will ensure conflict serializability.

Now every conflict serializable schedule is free from unrepeatable read problem.

So every strict schedule is free from unrepeatable read problem.
by Active (2.1k points)

@OneZero thats alright. but see the schedule even after applying strict 2pl T1 is reading two different A values.




Is it possible to write the above code in 2PL form?

It will cause a deadlock while attempting to perform 2PL.

Once deadlock occurs, we can use deadlock handling methods to terminate a transaction 

When the transaction restarts we will have have a deadlock set of transactions on which we can apply strict 2 PL.

How can you conclude every conflict serailizable schedule is free from unrepeatable read problem?
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,737 questions
57,321 answers
105,142 users