Home › GATE CSE › computerscience › Database 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).
Related questions
The main reasons production DBMSs avoid shadow paging in favour of WAL are that shadow pagWhat is the purpose of a Compensation Log Record (CLR) in ARIES?ARIES recovery is structured as exactlyFuzzy checkpoints differ from naive checkpoints byIn standard log-based recovery, the order of operations isAfter a crash, with checkpointing, the recovery system scans the logA complete log record for a write operation includesPer WAL semantics, a transaction is officially committed at the moment