Question :Different types of Transaction Isolation Levels? (JDBC)
Answer :The isolation level describes the degree to which the data being updated
is visible to other transactions. This is important when two transactions are
trying to read the same row of a table. Imagine two transactions A & B.
Three types of inconsistencies can occur:
· Dirty-read: A has changed a row, but has not committed the changes. B
reads the uncommitted data but his view of the data may be wrong if A
rolls back his changes and updates his own changes to the database.
· Non-repeatable read: B performs a read, but A modifies or deletes that
data later. If B reads the same row again, he will get different data.
· Phantoms: A does a query on a set of rows to perform an operation. B
modifies the table such that a query of A would have given a different
result. The table may be inconsistent.
TRANSACTION_READ_UNCOMMITTED : DIRTY READS, NON-REPEATABLE
READ AND PHANTOMS CAN OCCUR.
TRANSACTION_READ_COMMITTED : DIRTY READS ARE PREVENTED, NONREPEATABLE
READ AND PHANTOMS CAN OCCUR.
TRANSACTION_REPEATABLE_READ : DIRTY READS , NON-REPEATABLE
READ ARE PREVENTED AND PHANTOMS CAN OCCUR.
TRANSACTION_SERIALIZABLE : DIRTY READS, NON-REPEATABLE READ
AND PHANTOMS ARE PREVENTED.
www.interviewhelper.org is a hope for all the Job seekers. Users can find unlimited here. These range from technical to HR, from functional to behavioral. www.interviewhelper.org contains in the fields like Ajax,VB,Networking,Sharepoint,JEE,Perl,Javascript,Bioinformatics,Classic ASP,Unix,Linux,Accounting,Oracle DBA,Microprocessor,Bluetooth,jms,jme,.net framework,ABAP,ASP,ASP.net,Basic .net Framework,Interview Questions,C language,C++,database,Oracle,Java,PHP,LAMP,SAP etc.
Friday, March 13, 2009
Different types of Transaction Isolation Levels? (JDBC)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment