- Reference: http://en.wikipedia.org/wiki/Isolation_%28database_systems%29
Isolation Levels, Read Phenomena and Locks
[edit] Isolation Levels vs Read Phenomena
Isolation level |
Dirty reads |
Non-repeatable reads |
Phantoms |
Read Uncommitted |
may occur |
may occur |
may occur |
Read Committed |
- |
may occur |
may occur |
Repeatable Read |
- |
- |
may occur |
Serializable |
- |
- |
- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"may occur" means that the isolation level suffers that phenomenon, while "-" means that it does not suffer it.
[edit] Isolation Levels vs Locks
Isolation level |
Write Lock |
Read Lock |
Range Lock |
Read Uncommitted |
- |
- |
- |
Read Committed |
V |
- |
- |
Repeatable Read |
V |
V |
- |
Serializable |
V |
V |
V |
"V" indicates that the method locks for that operation, keeping that
lock till the end of the transaction containing that operation.
Note: Read (i.e.
SELECT) operations can acquire read (shared) locks in the
Read Committed isolation level, but they are released immediately after the read operation is performed.
ACID (
atomicity, consistency, isolation, durability)
No comments:
Post a Comment