what is a phantom read ?

J

John B. Matthews

gk said:
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]
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.]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top