CS FundamentalsVery hardGATE CS (PYQ pattern)

Which of the following statements about the SQL standard isolation levels (locking-based implementation) are correct? I. READ COMMITTED prevents dirty reads but allows non-repeatable reads. II. REPEATABLE READ prevents phantom reads. III. SERIALIZABLE prevents dirty reads, non-repeatable reads and phantoms. IV. READ UNCOMMITTED allows dirty reads but still prevents non-repeatable reads.

  1. A. I, II and III only
  2. B. I and III only
  3. C. II and IV only
  4. D. I, III and IV only

Correct answer: B. I and III only

II is false: REPEATABLE READ locks the rows it read but not the ranges, so new matching rows (phantoms) can still appear. IV is false: READ UNCOMMITTED takes no read locks, so it allows non-repeatable reads as well.

More DBMS and SQL questions

Exams that ask this topic