• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transactions Isolation Levels

 
Ramy Nady
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dears ,

I understand the concept of transactions isolation levels and we need it to avoid database anomalies issues like (Dirty reads [Read uncommitted] , Non-Repeatable reads [Read committed] )

What I know there is two locking strategies and I understand the difference.

1- Optimistic Locking - where DBMS use version number
2- Pessimistic Locking - either read / write

But I was reading some articles about transaction management then I found a different classification.

JDBC transaction isolation levels:

TRANSACTION_NONE
TRANSACTION_READ_UNCOMMITTED
TRANSACTION_READ_COMMITTED
TRANSACTION_REPEATABLE_READ
TRANSACTION_SERIALIZABLE

Can you please clarify such different classification and what should my answer be at interview for the question "what is the isolation levels ?"

Thanks in advance
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Read Uncommitted, Read Committed, Repeatable Read and Serializable are isolation levels as defined by the ANSI SQL standard (from weakest to strongest). They differ in which phenomena they allow to occur (Read Uncommitted allows dirty reads, for example). Ways in which these isolation levels should be implemented are not specified by the standard.

Optimistic locking (or "multiversioning") and pessimistic locking are basic mechanisms used by databases to implement transactions.

This is a rather broad topic. You can read more about transaction isolation levels here (for example):

http://www.info.teradata.com/HTMLPubs/DB_TTU_14_00/index.html#page/SQL_Reference/B035_1142_111A/ch09.131.022.html
http://www.oracle.com/technetwork/issue-archive/2010/10-jan/o65asktom-082389.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic