CS FundamentalsVery hardGATE CS (PYQ pattern)
R(A, B, C, D, E) has the functional dependencies D → A, EA → C, D → C, D → E, BC → A. How many attributes appear in the left sides of a canonical cover, counting every occurrence (that is, the total number of left-side attributes over all FDs of the cover, after splitting right sides)?
- A. 6
- B. 7
- C. 5
- D. 2
Correct answer: A. 6
A canonical cover is D→A, EA→C, D→E, BC→A; summing the left-side sizes gives the answer.
More DBMS and SQL questions
- R(A, B, C, D, E, F) has the functional dependencies F → B, C → A, BD → C, B → E, C → A, BC → A. How many superkeys does R have?
- R(A, B, C, D, E, F) has the functional dependencies DB → C, F → A, AD → C, F → B, CA → D, C → F. 3NF synthesis (canonical cover, one…
- Table AA(x, y): (1,1), (1,2), (2,2), (2,NULL), (3,NULL), (NULL,3). How many groups does SELECT x FROM AA GROUP BY x HAVING COUNT(y) <…
- QA(a, b): (1,2), (2,3), (3,1), (4,4). How many rows does SELECT FROM QA x JOIN QA y ON x.b = y.a JOIN QA z ON y.b = z.a return?
- CO(c, n): (a,1), (a,2), (b,3), (b,3), (c,NULL), (c,4). What are COUNT(DISTINCT n), SUM(n), SUM(DISTINCT n) and AVG(n), in that order?
- MT(id, g, v): (1,1,10), (2,1,20), (3,2,30), (4,2,40), (5,2,50), (6,3,60). What does SELECT SUM(v) FROM MT a WHERE v >= (SELECT AVG(v) FROM…