Databases Reference
In-Depth Information
Uncommitted read (UR)
This is the lowest level of isolation:
Any row already read by the current transaction can be updated by another
transaction.
The current transaction can see any uncommitted data from other
transactions.
Any kind of interaction except lost update is possible with this isolation level.
Cursor stability (CS)
The characteristics of CS are:
Any row except the current row read by this transaction can be updated by the
other transactions.
The current transaction cannot see the uncommitted data from other
transactions.
Non-Repeatable read and phantom read are possible with this isolation level.
Read stability (RS)
The characteristics of RS are:
Any row read by the current transaction cannot be updated by any other
transaction.
The current transaction cannot see the uncommitted data from other
transactions.
Interactions of type phantom read are possible between concurrent
transactions.
Repeatable read (RR)
This is the highest level of isolation. This isolation level completely isolates the
concurrent transactions:
Any row read by the current transaction cannot be updated by any other
transaction. At the same time, this isolation level makes sure that the
ResultSet of the same statement remains constant even if the statement is
executed twice in the same transaction.
Current transactions cannot see the uncommitted data from other
transactions.
The isolation level for a transaction can be set by calling the method
setTransactionIsolation of Connection object.
Example 5-22 on page 237 shows how to set the isolation level for a transaction.
Search WWH ::




Custom Search