The following table lists and describes the transaction isolation terminology.
Term |
Definition |
---|---|
Dirty read |
This describes the situation in which a transaction is permitted to read data from a row that has been modified by another executing transaction, but not yet committed. For example: Transaction 1 changes the row. Transaction 2 reads the changed row before transaction 1 commits the change. If transaction 1 rolls back its changes, then transaction 2 will have read a row that, following the rollback, is considered never to have existed. |
Nonrepeatable read |
A row is retrieved a second time by a transaction and the values in the row differ between the reads. For example: Transaction 1 reads a row. Transaction 2 deletes or updates that row and commits the change. If transaction 1 then attempts to reread the row, it will receive the updated value, or discover that the row does not exist. |
Phantom read |
During the course of a transaction, two identical queries are executed and different result sets are returned. For example: Transaction 1 reads a set of rows that satisfy some search criteria. Transaction 2 then inserts a row that matches the search criteria. Therefore if transaction 1 re-executes the statement that originally read the rows, it receives a different result set of rows. |
iWay Software |