CS FundamentalsVery hardProduct company interview · GATE level
R(A, B, C, D, E) has functional dependencies A → B, BC → D, D → AE and E → C. How many of the following dependencies are logically implied? 1. AC → E 2. B → C 3. BE → A 4. D → B
- A. 4
- B. 2
- C. 3
- D. 1
Correct answer: C. 3
Use attribute closures. {A, C}+: A gives B, BC gives D, D gives A and E - so AC → E holds. {B}+ = {B}: nothing fires, so B → C does not hold. {B, E}+: E gives C, BC gives D, D gives A - so BE → A holds. {D}+: D gives A and E, A gives B - so D → B holds. Three of the four are implied; only statement 2 fails.
More DBMS and SQL questions
- A relation r(A, B, C, D) currently holds exactly these five tuples: (1, 2, 3, 4) (1, 2, 5, 6) (2, 2, 3, 4) (3, 4, 5, 4) (3, 4, 3, 6) How…
- Consider the schedule R2(A); R3(B); W1(A); R2(C); W1(C); W2(B); R4(A); W4(C). Which statement is correct?
- Consider the schedule R1(A); W2(A); W2(B); W1(A); W1(B); W3(A); W3(B). Which statement is correct?
- T1 executes R1(A); W1(A); R1(B) and T2 executes R2(B); W2(B); R2(A). Of the 20 possible interleavings of these two transactions (including…
- No transaction has committed yet in the schedule W1(A); R2(A); W2(B); R3(B); W4(B); R5(B). T1 now aborts. Besides T1, which transactions…
- A lock manager grants a request whenever it is compatible with the locks currently held; otherwise the requester waits. The requests…