0% found this document useful (0 votes)
99 views1 page

Understanding Dirty Read in Databases

A dirty read occurs when one transaction updates a database item and fails, leaving the item updated but in an uncommitted state. Another transaction then reads the updated item before it can be rolled back to its original value, resulting in data that was never committed to the database being read. A dirty read happens when transaction T1 updates a record and transaction T2 reads it before T1's update is either committed or rolled back, potentially causing T2 to read invalid or non-existent data.

Uploaded by

Sia Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views1 page

Understanding Dirty Read in Databases

A dirty read occurs when one transaction updates a database item and fails, leaving the item updated but in an uncommitted state. Another transaction then reads the updated item before it can be rolled back to its original value, resulting in data that was never committed to the database being read. A dirty read happens when transaction T1 updates a record and transaction T2 reads it before T1's update is either committed or rolled back, potentially causing T2 to read invalid or non-existent data.

Uploaded by

Sia Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

 Dirty Read

o The dirty read occurs in the case when one transaction updates an item of the
database, and then the transaction fails for some reason. The updated database
item is accessed by another transaction before it is changed back to the original
value.
o A transaction T1 updates a record which is read by T2. If T1 aborts then T2 now
has values which have never formed part of the stable database.

Example:

You might also like