767 views
–1 votes
–1 votes

Please explain the concept of DIRTY READ In a simplified manner w/ a small example! 

1 Answer

2 votes
2 votes
In one statement :

Reading uncommitted data.

Say T1 is writing any variable x

Concurrently running, a transaction T2 requires the value of x

T1                        T2

write(x)         

                          read(x)

                          commit

failure

Now, when T1 fails, it is rolled back and the modified value of x is lost. The database still has the previous value which was last committed by any other transaction. However, T2 completed and got committed using the wrong value of x it might use in calculations. This is said as Dirty read problem.

Related questions

0 votes
0 votes
0 answers
1
sripo asked Nov 25, 2018
1,253 views
If I have dirty read which is write-read conflict does it imply that the schedule is non recoverable?Do all anomalies result of conflict result in non recoverable thereby...
4 votes
4 votes
1 answer
4
just_bhavana asked Aug 6, 2017
987 views
Where is unrepeatable read and dirty read taking place here?