CS FundamentalsHardGATE CS
In a wait-for graph the edges are T1 → T2, T2 → T3, T3 → T1, T3 → T4 and T5 → T2. What is the minimum number of transactions that must be aborted to break every deadlock?
- A. 0, because T4 can finish
- B. 1
- C. 2
- D. 3
Correct answer: B. 1
The only cycle is T1 → T2 → T3 → T1, and aborting any one of those three breaks it. T4 is not in the cycle, and T5 merely waits on T2; it is blocked but not deadlocked.
More DBMS and SQL questions
- Under basic two-phase locking, which order of serial execution is a schedule conflict equivalent to?
- A query plan computes σ{dept = 'D1' ∧ sal > 50}(Emp ⋈ Dept). Which rewrite is a heuristic optimizer most likely to apply first, and why?
- A B+ tree has order p = 4 (at most 4 children per internal node, at most 3 keys per leaf) and every node except the root is at least half…
- A relation R has candidate keys AB and BC, and FDs AB → C, C → A. Which statement explains why R is in 3NF but not BCNF?
- Which relational-algebra equivalence is NOT valid in general?
- R(A, B, C, D, E, F, G) has the functional dependencies AB -> C, C -> D, D -> A, BE -> F, F -> E, CG -> B. How many candidate keys does R…