Explain the types of concurrency issues in the transaction processing that isolation levels attempt to address.Dirty reads issue is as follows: First transaction is reading the uncommitted changes which are performed by a second transaction. In this scenario , if the second transaction is rolled back, the data read by the first transaction becomes invalid. The reason is, the roll back does not make any changes, and the first transaction is unaware about the roll back done by the second transaction.
Phantom reads issue is as follows: A new record is added to a database. A transaction started before the insertion, so this record can be detectable by this transaction. After starting the other transaction, the queries will include records added. In this situation the record inserted / added is a phantom record.
Unrepeatable reads issue is as follows: A component which finds its previously read data which is being modified by other component. The problem of appearing a new set of data in a database between 2 database operations.
Explain the types of concurrency issues in the transaction processing that isolation levels attempt to address.Types of concurrency issues that can be handled by isolation levels in J2EE are:
Dirty reads issue: First transaction is reading the uncommitted changes which are performed by a second transaction. In this scenario, if the second transaction is rolled back, the data read by the first transaction becomes invalid. The reason is, the roll back does not make any changes, and the first transaction is unaware about the roll back done by the second transaction.
Phantom reads issue: A new record is added to a database. A transaction started before the insertion, so this record can be detectable by this transaction. After starting the other transaction, the queries will include records added. In this situation the record inserted / added is a phantom record.
Unrepeatable reads issue: A component which finds it’s previously read data which is being modified by other component.
|