This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes phantom and dirty read? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "phantom and dirty read?" Watch "phantom and dirty read?" New topic

phantom and dirty read?

kiran kumar

Joined: May 24, 2008
Posts: 18
what is phantom and dirty read?

Thanks & Regards,<br />Bhuvan Samrat.
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

rahul, please choose the forum you post your questions in more carefully. None of these questions are advanced Java questions. I'll move this to a more appropriate forum.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Both terms relate to transaction isolation in databases.

A "phantom read" means if you run some sql at one point in time, then run it again later more results may be returned. i.e. between the first and second runs, more data may have been added that satisfies your query criteria.

A "dirty read" is when you can read uncommitted data. i.e. data that may not end up being persisted into the database.
[ June 09, 2008: Message edited by: Paul Sturrock ]
I agree. Here's the link:
subject: phantom and dirty read?
Similar Threads
difference between dirty read and phantom
Difference between Read Lock and Write Lock
Transaction Levels
Serializable isolation in EJB