Difference between Dirty, commited ,phantom,repeatable
reads?

Answer Posted / bawa

- Dirty read—Dirty reads occur when one transaction reads data that has been written but not yet committed by another transaction. If the changes are later rolled back, the data obtained by the first transaction will be invalid.

- Nonrepeatable read—Nonrepeatable reads happen when a transaction performs the same query two or more times and each time the data is different. This is usually due to another concurrent transaction updating the data
between the queries.

- Phantom reads—Phantom reads are similar to nonrepeatable reads. These occur when a transaction (T1) reads several rows, and then a concurrent transaction (T2) inserts rows. Upon subsequent queries, the first transaction (T1) finds additional rows that were not there before.

Is This Answer Correct ?    29 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the classes and methods used for sending sql statements to database?

536


List the advantages of using datasource?

552


What do you mean by batch processing in jdbc?

518


What is the advantage of namedparameterjdbctemplate?

503


How a database driver can be loaded with jdbc 4.0 / java 6?

488






Explain how data flows from view to db and reverse

1626


Define preparedstatement.

531


How do I set properties for a JDBC driver and where are the properties stored?

488


Why should we close database connections in java?

681


Discuss the significances of jdbc.

514


What is the purpose of jdbc resultset interface?

568


How many types of jdbc drivers are available?

488


What is the different between ResultSet and RowSet?

535


Is there another way of dealing with the result set that could execute faster?

516


How to move the cursor in scrollable resultset ?

569