CS FundamentalsHardGATE CS
No transaction has committed. T1 writes A; T2 reads A and writes B; T3 reads B; T4 reads C, which only T5 wrote; T5 reads nothing written by others. If T1 now aborts, how many OTHER transactions must be rolled back?
- A. 1
- B. 3
- C. 4
- D. 2
Correct answer: D. 2
T2 read T1's uncommitted A, and T3 read T2's uncommitted B, so both cascade. T4 depends only on T5 and T5 on nobody, so they are unaffected: 2 transactions.
More DBMS and SQL questions
- A table has 1,000,000 rows in 10,000 blocks. A range predicate selects 20% of the rows, which are spread evenly across the table. There is…
- Table T(a, b, c) has a composite B+ tree index on (a, b), and the query is SELECT b FROM T WHERE a = 5. What is the main benefit of this…
- In extendible hashing, the global depth is 3 and a full bucket with local depth 2 must split on an insert. What happens?
- R(Emp, Skill, Lang) satisfies Emp ↠ Skill (so also Emp ↠ Lang), and it is decomposed into the 4NF relations (Emp, Skill) and (Emp, Lang)…
- R(a) = {1, 2, 3} and S(a) = {2, 3, 3, 4} (S is a bag). How many rows does SELECT FROM R FULL OUTER JOIN S ON R.a = S.a return? (Checked in…
- A relation has 6 attributes. What is the largest possible number of candidate keys it can have under some set of functional dependencies?