Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

phantom and dirty read?

 
kiran kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
what is phantom and dirty read?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic