CS FundamentalsVery hardGATE CS · DBMS
Which statement about snapshot isolation (SI) is correct?
- A. It allows dirty reads but prevents non-repeatable reads
- B. It is equivalent to serializable isolation
- C. It prevents lost updates through first-committer-wins but can still allow write skew
- D. It prevents write skew but allows lost updates
Correct answer: C. It prevents lost updates through first-committer-wins but can still allow write skew
Each transaction reads a consistent snapshot, and concurrent writes to the same item abort one writer (no lost update). Two transactions that read overlapping data but write different items (write skew) can both commit, so SI is not serializable.
More DBMS and SQL questions
- R(A, B) has 300 tuples and S(B, C) has 50 tuples, where S.B is the primary key of S and R.B is a foreign key referencing it (NOT NULL)…
- Table P(x) rows: (1), (2), (2), (3), (NULL). Table Q(x) rows: (2), (3), (3), (NULL), (4). What does this query return? sql SELECT COUNT()…
- R has 500 tuples in 50 blocks and S has 4000 tuples in 200 blocks. With only enough memory for one block of each relation, how many block…
- Under BOTH wait-die and wound-wait deadlock prevention, which transaction can be rolled back when a lock conflict occurs?
- Table Acct(no, branch, bal) rows: (101, 'Agra', 500), (102, 'Agra', 1500), (103, 'Bhopal', 700), (104, 'Bhopal', 700), (105, 'Cuttack'…
- R(A, B, C, D, E, F) with functional dependencies E → B, F → A, B → A, C → E is decomposed into R1(A, B, F), R2(B, D, E), R3(C, E). Which…