What is a "dirty read"?- In typical database transactions, one transaction reads changes the value while the other reads the value before committing or rolling back by the first transaction. This reading process is called as 'dirty read'.
Because there is always a chance that the first transaction might rollback the change which causes the second transaction reads an invalid value.
- It takes no notice of any other lock taken by another process.
- It is a problem if the uncommitted transaction fails or is rolled back.
Example: suppose transaction 1 updates a row. Transaction 2 reads the updated row before transaction 1 commits the update. If transaction 1 rolls back the change, transaction 2 will have read data that is considered never to have existed.