CS FundamentalsHardGATE CS
Consider the schedule R1(A), W2(A), R3(A), W1(A) on a single item A. Is it conflict serializable?
- A. No, because T1 and T2 form a cycle in the precedence graph.
- B. Yes, it is equivalent to the serial order T1, T2, T3.
- C. Yes, it is equivalent to the serial order T2, T3, T1.
- D. No, because T2 and T3 form a cycle in the precedence graph.
Correct answer: A. No, because T1 and T2 form a cycle in the precedence graph.
R1 before W2 gives T1 -> T2, and W2 before W1 gives T2 -> T1: a cycle, so no serial order is conflict equivalent. T2 and T3 have only T2 -> T3.
More DBMS and SQL questions
- In a B+ tree, an internal node can hold up to p child pointers and p - 1 keys. The block size is 1024 bytes, a key takes 8 bytes and a…
- A(k) holds 1, 2, 3 and B(k, v) holds (1, NULL), (2, 5). How many rows does SELECT FROM A LEFT JOIN B ON A.k = B.k WHERE B.v IS NULL return?
- E(n, sal) holds (a, 10), (b, 20), (c, 30), (d, 40). After UPDATE E SET sal = sal + 10 WHERE sal < (SELECT AVG(sal) FROM E), what is…
- An ER diagram has entities Student, Course and Prof. Student and Course are related by Enrols (many-to-many, with attribute grade). Each…
- T(g, x) holds (a, 1), (NULL, 2), (a, 3), (NULL, 4), (b, 5). How many rows does SELECT g, COUNT() FROM T GROUP BY g return?
- Ed(a, b) holds the edges (1, 2), (2, 3), (3, 1), (3, 4). How many rows does the following return? WITH RECURSIVE p(n, d) AS (SELECT 1, 0…