CS FundamentalsVery hardGATE CS (PYQ pattern)
R(A, B, C, D, E) has the functional dependencies A → B, BC → D and D → E. How many non-trivial functional dependencies of the form X → Y, where X is a non-empty proper subset of the attributes and Y is a single attribute not in X, are implied by this set?
- A. 30
- B. 19
- C. 25
- D. 3
Correct answer: C. 25
For every proper subset X compute closure(X) and count the attributes outside X it determines (sum over all 30 non-empty proper subsets). The total is 25; the given 3 FDs are only a tiny part of the implied ones.
More DBMS and SQL questions
- A relation R(A, B, C) holds the tuples (1,x,10), (1,y,20), (2,x,20), (2,z,30), (3,y,10). It is decomposed into R1 = π(A,B) R and R2 =…
- Tables D(d): 1, 2, 3, 4. E(e, d, sal): (10,1,60), (11,1,40), (12,2,30), (13,3,70), (14,3,80), (15,NULL,90). How many rows does SELECT FROM…
- T(x) holds 1, 2, 3, 4, 5, 6, NULL and U(y) holds 2, 4, NULL. Let a, b, c be the row counts of (a) SELECT FROM T WHERE x NOT IN (SELECT y…
- Table S(id, v): (1,10), (2,20), (3,20), (4,30), (5,30), (6,40). SELECT SUM(v) OVER (ORDER BY v) AS s FROM S ORDER BY id; What is the sum…
- Table P(n, s): (a,90), (b,85), (c,85), (d,70), (e,70), (f,70), (g,60). A query computes r = RANK() OVER (ORDER BY s DESC) and d =…
- Table W(id, dept, sal): (1,A,50), (2,A,70), (3,A,90), (4,B,40), (5,B,40), (6,C,100), (7,C,20), (8,C,NULL), (9,D,NULL). SELECT COUNT() FROM…