menu

Friday 21 February 2014

Isolation level

Transactional Integrity

ACID Properties

1. Atomic: A transaction must be all or nothing, no partial transaction. Each transaction is a complete unit of work. The entire transaction is either successes or fails no partial transaction.
2. Consistent:  Each transaction preserves database consistency. The database goes from one consistent state to another consistent state.
3. Isolation: Each transaction is separate, means the worked done by transaction A should not affect transaction B.
4.  Durable: Each transaction should be permanent, Means once transaction commit, is always be there.


Transactional Trouble:
1.       Dirty Read
2.       Non Repeatable read
      3.  Phantom rows


Dirty Read : In case of dirty read you will see the modified data by session one even session1 not committed the transaction.



Non Repeatable read: In this Case you can see the different data in same transaction. 


Phantom row : In this case the row inserted by session1 or updated by session one will get visible in session2 even that session started before inserting this row and not yet committed 






No comments:

Post a Comment