in Databases
407 views
1 vote
1 vote
what is the difference between
 Unrepeatable read, phantom read and lost update?
in Databases
by
407 views

3 Comments

Okay my doubt about lost updte is cleared now and i know what is Unrepeatable  read but wat is the difference between unrepeatable read and phantom read? whts the basic difference here?
0
0

in unrepeatable read one transaction reads two different values .

T1 T2
R(x) //initial x=100  
  W(x)   x=x+100
R(x) //x=200.  

Here transaction T1 read having two values,this is unrepeatable read.

In phantom read same as unrepeatable read one difference is value not exists or new values inserted in between when more than one time transaction executes.

T1 T2
R(x) // x=100  
  R(x)  // x=100
delete(x)  
  R(x)  // not exists.

or simple query

T1=select * from employee where rank>100

T2=insert into employee(A,120)

Transaction B inserts a row that would satisfy the query in Transaction A if it were issued again.

​​​​​​​

3
3
Nicely explained thnks.. :)
1
1

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
1
Deepalitrapti asked in Databases Aug 17, 2018
1,314 views
Deepalitrapti asked in Databases Aug 17, 2018
1.3k views