CS FundamentalsVery hardWipro Elite · LTIMindtree
Basic timestamp ordering is used with timestamps TS(T1) = 1, TS(T2) = 2, TS(T3) = 3. The schedule on one item A is R2(A), W3(A), R1(A), W2(A), W1(A). Which transactions are aborted? (An aborted transaction's later operations are discarded.)
- A. T2 only
- B. T1 only
- C. T1 and T2
- D. No transaction is aborted
Correct answer: C. T1 and T2
After R2 and W3, RTS(A) = 2 and WTS(A) = 3. R1(A) has TS 1 < WTS 3, so T1 aborts. W2(A) has TS 2 < WTS 3, so T2 aborts. W1 is discarded.
More DBMS and SQL questions
- Relation R has 1,000 tuples with 100 distinct values of attribute A, and S has 500 tuples with 50 distinct values of A, all of which…
- A B+ tree is built so that every node is completely full: a leaf holds 100 keys and an internal node has 101 children. It indexes…
- R(A, B, C, D, E) has the functional dependencies AB -> C, C -> D, D -> E and E -> A. How many candidate keys does R have?
- Consider the schedule R1(A), W2(A), W1(A), W3(A). Which statement is correct?
- W(d, x) holds (1, 10), (2, 20), (2, 30), (3, 40). What value does SUM(x) OVER (ORDER BY d) give on the row (2, 20)?
- Under the SQL standard's isolation levels, which anomaly can still occur at REPEATABLE READ but is prevented at SERIALIZABLE?