Practice free →
HomeGATE CSEcomputerscienceDatabase Management Systems › A phantom read differs from an unrepeatable read…

A phantom read differs from an unrepeatable read in that

Aphantom reads are blocked by 2-phase locking but unrepeatable reads are not
Bunrepeatable reads happen on indexes, phantom reads on heap tables
Cthey are two names for the same anomaly
Dphantom is NEW rows mid-transaction; unrepeatable is same row changing value
Answer & Solution
Correct answer: D. phantom is NEW rows mid-transaction; unrepeatable is same row changing value
Unrepeatable read = the same row gives a different value on a second read inside the same transaction. Phantom = a query returns a different SET of rows because new ones were inserted that match the predicate. Same isolation neighbourhood, but the lock granularity needed to prevent them is different (predicate locks vs row locks).
Solve this in the app — GATE CSE practice & 24k+ MCQs →
Related questions