Phantom read in JDBC - posted by Amit Satpute
What is phantom read?
Answer
If you execute a query at time T1 and re-execute it at time T2, additional rows
may have been added to the database, which may affect your results.
This differs from a nonrepeatable read in which data already read hasn't been
changed but more data satisfies your query criteria than before.This problem
can be solved by setting the transaction isolation level to
TRANSACTION_SERIALIZABLE
Phantom read in JDBC - posted by Vidya Sagar
What is a non-repeatable read? What is phantom read?
Non-repeatable read:
While performing select statement, non-repeatable reads my occur when read locks
are not acquired. Non-repeatable reads may occur at the need of effected
transaction by a commit conflict, must roll back is relaxed.
Phantom read:
At the time of execution of a transaction, if two queries that are identical
are executed, and the rows returned are different from one another, it is
stated that a phantom read occurred. The possibility of occurring phantom reads
is when the range locks are not acquired by the execution of SELECT.
More JDBC Links
Answer - Resultset contains results of the SQL query.....
What
are different transaction levels in JDBC?
Answer - Transaction Isolation levels is used to implement
locking.....
Answer - There are two kinds of locking available in JDBC.....
Answer - Failure to load the appropriate JDBC driver before
giving a call to .....
|