aspose file tools*
The moose likes JDBC and the fly likes Why does phantom reads  are considered as Error or a Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Why does phantom reads  are considered as Error or a Problem" Watch "Why does phantom reads  are considered as Error or a Problem" New topic
Author

Why does phantom reads are considered as Error or a Problem

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi

A phantom read occurs when, in the course of a transaction, two identical queries are executed, and the collection of rows returned by the second query is different from the first. This can occur when range locks are not acquired on performing a SELECT.


How can a Phantom read be a problem ever ?

In my view when data is chnaged , the second query will definately return new things .

Can anybody let me know this , why this is said to be a problem ??


Save India From Corruption - Anna Hazare.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2497
    
    8

From our forum:
http://www.coderanch.com/t/304290/JDBC/java/Phantom-Read
Whether a phantom read is a problem or not depends solely on your application.


OCUP UML fundamental and ITIL foundation
youtube channel
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Great , thank you very much.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why does phantom reads are considered as Error or a Problem