CS FundamentalsVery hardGATE CS (PYQ pattern)
Multiversion timestamp ordering with TS(T1) < TS(T2) < TS(T3): a read of X returns the version with the largest write timestamp <= TS(T) and records the read timestamp; a write by T is rejected (T aborts) if the version it would follow has a read timestamp greater than TS(T), otherwise it creates a new version. Once aborted, a transaction's later operations are ignored. Schedule: R3(A), W1(B), W3(B), R2(B), R2(B), R1(B), W3(A), W2(A), W2(B). Which transaction aborts?
- A. T1
- B. T3
- C. No transaction aborts
- D. T2
Correct answer: D. T2
Track version write/read timestamps per item: the write by T2 finds that a younger transaction has already read the version it would overwrite, so it is rejected; all other operations succeed (reads never abort in MVTO).
More DBMS and SQL questions
- An equi-width histogram on column A (range 0 to 100, 10,000 rows) has buckets [0,20): 4000, [20,40): 2500, [40,60): 1500, [60,80): 1500…
- Relations R (1000 tuples), S (2000), T (500). Join selectivities: R–S 0.001, S–T 0.01, R–T 0.0005 (fraction of the cross product that…
- Sort-merge join of R (1000 pages) and S (400 pages) with 20 buffer pages. Each relation is fully sorted by external merge sort (pass 0…
- The owner O of a table issues, in this order (with GRANT OPTION each time): 1) O grants SELECT to A; 2) O grants SELECT to B; 3) A grants…
- ACC(id, bal): (1,100), (2,200), (3,300), (4,400). A row-level trigger AFTER UPDATE ON ACC FOR EACH ROW WHEN NEW.bal > 250 inserts (NEW.id…
- K(a UNIQUE, b CHECK (b > 0)) is empty. These rows are inserted one by one, ignoring any row that violates a constraint: (1,5), (1,6)…