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.
- A. I, II and III only
- B. I and III only
- C. II and IV only
- 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
- A log (immediate modification, redo-undo recovery, checkpoint lists active transactions) reads: <T1 start>, <T1,A,1,2>, <T2 start>…
- A B+ tree has 4096-byte nodes, 10-byte keys and 6-byte tree pointers. An internal node with n pointers carries n - 1 keys. A leaf holds…
- A query scans a table of 11 pages sequentially, 5 times in a row, with a buffer pool of 10 pages (initially empty). How many buffer hits…
- An ER model has entity sets E1, E2, E3 and a weak entity W (identified through E3 by an identifying 1:N relationship). Relationships…
- Entity sets A (6 entities) and B (9 entities) are linked by relationship R. Every A entity must take part in R (total participation) and…
- E1(id, d, s): (1,x,50), (2,x,70), (3,x,70), (4,y,40), (5,y,40), (6,z,90), (7,z,NULL), (8,w,NULL). How many rows does SELECT FROM E1 a…