During processing of concurrent
transactions, unclarified situations, or "phenomena" can arise. When you define the lock behavior in your database system, you should take account on the ways of avoiding these phenomena.The following phenomena can occur if the same data is accessed concurrently:
The lock mode if defined via the
isolation level (Requesting and Releasing a Lock). Depending on the isolation level you determine, you can prevent these phenomena from occurring.The following table provides an overview of which phenomena can occur in the individual isolation levels:
Isolation Level 0 |
Isolation Level 1 |
Isolation Level 2 |
Isolation Level 3 |
|
Dirty Read |
+ |
- |
- |
- |
Non-Repeatable Read |
+ |
+ |
- |
- |
Phantom |
+ |
+ |
+ |
- |