What are the various isolation levels in a transaction and differences between them


Answered by Jey on 2005-05-08 19:35:35: There are three isolation levels in Transaction. They are 1. Dirty reads 2.Non repeatable reads 3. Phantom reads. 
 
Dirrty Reads If transaction A updates a record in database followed by the transaction B reading the record then the transaction A performs a rollback on its update operation, the result that transaction B had read is invalid as it has been rolled back by transaction A. 
 
NonRepeatable ReadsIf transaction A reads a record, followed by transaction B updating the same record, then transaction A reads the same record a second time, transaction A has read two different values for the same record. 
 
Phantom ReadsIf transaction A performs a query on the database with a particular search criteria (WHERE clause), followed by transaction B creating new records that satisfy the search criteria, followed by transaction A repeating its query, transaction A sees new, phantom records in the results of the second query. 
 

Showing Answers 1 - 3 of 3 Answers

Jey

  • May 8th, 2005
 

There are three isolation levels in Transaction. They are 1. Dirty reads 2.Non repeatable reads 3. Phantom reads. 
 
Dirrty Reads If transaction A updates a record in database followed by the transaction B reading the record then the transaction A performs a rollback on its update operation, the result that transaction B had read is invalid as it has been rolled back by transaction A. 
 
NonRepeatable ReadsIf transaction A reads a record, followed by transaction B updating the same record, then transaction A reads the same record a second time, transaction A has read two different values for the same record. 
 
Phantom ReadsIf transaction A performs a query on the database with a particular search criteria (WHERE clause), followed by transaction B creating new records that satisfy the search criteria, followed by transaction A repeating its query, transaction A sees new, phantom records in the results of the second query. 
 

  Was this answer useful?  Yes

J. P. Naidu

  • Jul 28th, 2005
 

TRANSACTION_READ_UNCOMMITED 
TRANSACTION_READ_COMMITED=== Avoids dirty read  
TRANSACTION_REPEATABLE_READ ===Avoids Non repeatable re 
TRANSACTION_SERIALIZABLE=== Avoids Phontom reads

  Was this answer useful?  Yes

Ahmed

  • Feb 14th, 2006
 

Isolation levels are Dirty_Read, Non Repeatable read and phantoms. These are the inconsistancies which are occured in transactions. To avoid these inconsistencies , we have 4 types of attributes.TRANSACTION_READ_UNCOMMITED TRANSACTION_READ_COMMITED=== Avoids dirty read TRANSACTION_REPEATABLE_READ ===Avoids dirty read and Non repeatable read TRANSACTION_SERIALIZABLE=== Avoids dirty read , Non repeatable read and Avoids Phontom reads

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions