CS FundamentalsVery hardGATE CS (PYQ pattern)
R(A, B, C, D, E) has the functional dependencies DB → A, A → C, D → C, C → B. R is decomposed and one fragment is R1(A, C, D). Counting dependencies of the form X → a with X a non-empty proper subset of {A, C, D} and a a single attribute of {A, C, D} not in X, how many hold on R1 (that is, are implied by the original FDs)?
- A. 6
- B. 4
- C. 7
- D. 5
Correct answer: D. 5
Compute closures of A, C, D, AC, AD and CD in the full FD set (intermediate attributes such as B or E may be used) and count the attributes of R1 outside X in each closure: total 5. Using only the FDs written entirely inside R1 would undercount.
More DBMS and SQL questions
- R(A, B, C, D, E) has FDs A → B, BC → D, D → E, E → B. Which of the following are implied? I. AC → D II. A → E III. AC → E IV. D → B V. CD…
- R(A, B, C, D, E, F) has the functional dependencies B → C, FE → D, EF → B, E → A, CF → E. How many attributes of R are prime (belong to at…
- F = {A→B, B→C, AC→D, D→A} on R(A, B, C, D). Which of the following FD sets is equivalent to F (has exactly the same closure)?
- R(A, B, C, D, E) has FDs A → B, BC → D, D → E. How many of these four binary decompositions are lossless-join? (1) (A, B, C) and (C, D, E)…
- Table N(id) has 10 rows with ids 1 to 10. For SELECT id, NTILE(4) OVER (ORDER BY id) AS g, CUMEDIST() OVER (ORDER BY id) AS cd FROM N…
- Table K(a, b): (0,5), (3,7), (0,NULL), (NULL,4), (2,NULL), (0,0). What does SELECT SUM(COALESCE(NULLIF(a, 0), b)) FROM K return?