top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is “dirty read” in JDBC? Which isolation level prevents dirty read?

0 votes
739 views
What is “dirty read” in JDBC? Which isolation level prevents dirty read?
posted Sep 18, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

When we work with transactions, there is a chance that a row is updated and at the same time other query can read the updated value. This results in a dirty read because the updated value is not permanent yet, the transaction that has updated the row can rollback to previous value resulting in invalid data.

Dirty Read is prevented by isolation levels TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ and TRANSACTION_SERIALIZABLE.

answer Sep 19, 2017 by Pankaj Singh
...