CS FundamentalsVery hardGATE CS (PYQ pattern)
TS(T1) < TS(T2) < TS(T3). T1: W1(A), R1(B); T2: R2(A), W2(B); T3: W3(A), W3(B). Of all 90 interleavings, how many complete with NO abort under basic timestamp ordering, and how many under timestamp ordering with the Thomas write rule?
- A. 8 and 5
- B. 5 and 13
- C. 5 and 8
- D. 8 and 8
Correct answer: C. 5 and 8
Simulating the read/write timestamp checks on all 90 interleavings: basic TO accepts 5; Thomas additionally skips obsolete writes and accepts 8.
More DBMS and SQL questions
- Multiversion timestamp ordering with TS(T1) < TS(T2) < TS(T3): a read of X returns the version with the largest write timestamp <= TS(T)…
- 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…