CS FundamentalsVery hardGATE CS (PYQ pattern)
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 relation per left side, drop subsumed relations, add a key relation if no relation contains a key, ties broken by the first candidate key in alphabetical order) produces relations. What is the total number of attributes across all resulting relations (counting an attribute once for each relation it appears in)?
- A. 15
- B. 13
- C. 14
- D. 6
Correct answer: C. 14
The synthesized relations are ['BCD', 'ABF', 'ACD', 'CDF', 'CE']; their sizes sum to 14.
More DBMS and SQL questions
- 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…
- VW(id, v): (1,5), (2,15), (3,25) and the view BIG = SELECT id, v FROM VW WHERE v > 10. Two more rows (4,8) and (5,30) are then inserted…
- Relation R(A, B) has 6 tuples with 4 distinct values of A and 5 distinct values of B. What are the minimum and maximum possible…