1. Home
  2. Data Science
  3. SQL for Data Analysis
  4. Which anomaly does the SQL standard still permit under the…

Added 30 Nov -0001

Which anomaly does the SQL standard still permit under the REPEATABLE READ isolation level?

  1. Dirty reads, where uncommitted data from another transaction stays visible
  2. Non-repeatable reads, where a re-read row shows a changed value
  3. Lost updates, where two writers overwrite each other's committed change
  4. Phantoms, where a re-run query returns rows inserted since the first run Correct answer

Correct answer

D. Phantoms, where a re-run query returns rows inserted since the first run

22 views

MCQSEXAM

Explanation

Under REPEATABLE READ, rows already read keep their values, so dirty and non-repeatable reads are prevented, but the standard still permits phantoms: new rows matching the predicate can appear on a re-execution. SERIALIZABLE forbids phantoms as well. Implementation matters, because PostgreSQL's snapshot-based REPEATABLE READ actually prevents phantoms, so the expected answer depends on the engine named.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More SQL for Data Analysis MCQs

Practise all SQL for Data Analysis MCQs

Similar MCQs