CS FundamentalsHardProduct-company MCQ pattern
Under basic timestamp ordering, TS(T1) = 10 and TS(T2) = 20. T2 has read item X, so read-TS(X) = 20. T1 now issues write(X). What happens?
- A. The write is ignored under the Thomas write rule
- B. T2 is rolled back
- C. T1 is rolled back
- D. The write is performed
Correct answer: C. T1 is rolled back
A write by T1 is rejected when TS(T1) < read-TS(X): a younger transaction already read the old value, so T1 is aborted and restarted. The Thomas write rule only ignores obsolete writes when a younger transaction has WRITTEN X, not read it.
More DBMS and SQL questions
- R(A, B, C, D, E, F) has FDs A → B, BC → D, D → E, E → C, CE → F. Which of these is NOT a candidate key?
- Table Emp(id, name, dept, salary, mgr) rows: (1, 'Asha', 'HR', 50000, NULL), (2, 'Ravi', 'IT', 70000, 1), (3, 'Meena', 'IT', 70000, 2)…
- Which isolation-related statement is correct for the SQL standard levels?
- Which statement about dense and sparse indexes is correct?
- Table Emp(id, name, dept, salary, mgr) rows: (1, 'Asha', 'HR', 50000, NULL), (2, 'Ravi', 'IT', 70000, 1), (3, 'Meena', 'IT', 70000, 2)…
- Which statement about view serializability is correct?