From: John B. Matthews on 20 Jun 2010 12:13 In article <06003d05-1f68-4c60-844a-f93bad0e6e81(a)s4g2000prh.googlegroups.com>, gk <srcjnu(a)gmail.com> wrote: > On Jun 20, 10:34 am, Lew <no...(a)lewscanon.com> wrote: > > gk wrote: > > > > > where is the key difference(if any) ? > > > > Phantom read is a different number of rows returned from the query. > > True. because in the example they are using "INSERT" in transaction > 2. surprisingly, Phantom read also called "REPEATABLE READ". No, phantom read is a potential problem at the REPEATABLE READ isolation level when a query contains a range in the WHERE clause, e.g. "BETWEEN 10 AND 30". [1] > Is it because they are not MODIFYING the values but adding some extra > records into it i.e it repeates the values with some additional > records. No, "This can occur when range locks are not acquired on performing a SELECT." [2] > > Non-repeatable read is different values returned for a given row. > > True. because in the example they are using "UPDATE" in transaction > 2. However,both of them are showing faulty results at the end of > Transaction 1. At the READ COMMITTED isolation level, "non-repeatable reads may occur in a lock-based concurrency control method when read locks are not acquired when performing a SELECT." [4] The broken link from [3] to [4] has been repaired. [1]<http://en.wikipedia.org/wiki/Isolation_(database_systems)#REPEATABLE_READ> [2]<http://en.wikipedia.org/wiki/Isolation_(database_systems)#Repeatable_reads_.28phantom_reads.29> [3]<http://en.wikipedia.org/wiki/Isolation_(database_systems)#READ_COMMITTED> [4]<http://en.wikipedia.org/wiki/Isolation_(computer_science)#Read_Committed_.28Non-repeatable_reads.29> [Please trim signatures.]
First
|
Prev
|
Pages: 1 2 3 4 5 Prev: consuming the web service Next: Need help designing some JUnit tests |