GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  EJB
Go To First  |  Previous Question  |  Next Question 
 EJB  |  Question 23 of 175    Print  
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. 
 



  
Total Answers and Comments: 3 Last Update: February 14, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 08, 2005 19:35:35   #1  
Jey        

RE: What are the various isolation levels in a transaction and differences between them
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. 
 

 
Is this answer useful? Yes | No
July 28, 2005 11:58:56   #2  
J. P. Naidu        

RE: What are the various isolation levels in a transaction and differences between them
TRANSACTION_READ_UNCOMMITED 
TRANSACTION_READ_COMMITED=== Avoids dirty read  
TRANSACTION_REPEATABLE_READ ===Avoids Non repeatable re 
TRANSACTION_SERIALIZABLE=== Avoids Phontom reads

 
Is this answer useful? Yes | No
February 14, 2006 05:35:38   #3  
Ahmed        

RE: What are the various isolation levels in a transac...
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
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape