Consider the relation R(P, Q, R, S, T, U, V, W, X, Y) and FDs: {P, Q, S} → T R → Y {P, Q} → V {R, X} → X Q → U V→{W, X} Which of the following is a candidate key?
{P, Q, R, S}
A candidate key is a minimal set of attributes whose closure contains every attribute of the relation. Any attribute that never appears on the right-hand side of a non-trivial FD cannot be derived and must belong to every candidate key.
Step 1 — Right-hand sides are T, Y, V, X (trivial in {R, X} → X), U, W, X. Attributes P, Q, R and S never appear on a right-hand side, so every key must contain {P, Q, R, S}.
Step 2 — Closure of {P, Q, R, S}: {P, Q} → V adds V; V→{W, X} adds W, X; Q → U adds U; {P, Q, S} → T adds T; R → Y adds Y. The closure is {P, Q, R, S, T, U, V, W, X, Y}, the whole relation, so {P, Q, R, S} is a superkey.
Step 3 — It is minimal because each of P, Q, R, S is underivable, so dropping any one loses it. So {P, Q, R, S} is a candidate key, and in fact the only one.
{R, Q, X} lacks P and S, and its closure {R, Q, X, Y, U} is not the whole relation; {V, X} gives only {V, W, X}. Since a candidate key exists among the choices, None of the above is wrong.
{P, Q, R, S} option is correct.
Let R = ABCDE is a relational scheme with functional dependency set F = {A → B, B → C, AC → D}. The attribute closures of A and E are
A relation R = {A, B, C, D, E, F,G} is given with following set of functional dependencies :
F = {AD → E, BE → F, B → C, AF → G}
Which of the following is a candidate key ?
The relation schemas \(R_{1}\) and \(R_{2}\) form a Lossless join decomposition of R if and only if :
(a) \(R_{1} \cap R_{2} \twoheadrightarrow (R_{1} - R_{2})\)
(b) \(R_{1} \rightarrow R_{2}\)
(c) \(R_{1} \cap R_{2} \twoheadrightarrow (R_{2} - R_{1})\)
(d) \(R_{2} \rightarrow R_{1} \cap R_{2}\)
Codes :
Let R ={A, B, C, D, E, F} be a relation schema with the following dependencies
\(C \rightarrow F, E \rightarrow A, EC \rightarrow D, A \rightarrow B\)
Which of the following is a key for R ?
Consider a relation schema R = (U, V, W, X, Y, Z), on which the following functional dependencies hold :
{U→V, VW→X, Y→W; X→U}
The candidate keys of R are :
Consider a schema R(P,Q,R,S) and the following functional dependencies P→Q, Q→R, R→S, S→Q.
Then decomposition of R1 (P,Q), R2 (Q,R) and R3 (Q,S) is :
Consider the relation
Student(stuid, dept, clsroll)
The following functional dependencies are given:
FD1: stuid → dept
FD2: dept → stuid
FD3: stuid → clsroll
FD4: clsroll → stuid
FD5: dept → clsroll
Which functional dependencies should be removed to obtain the canonical cover of the set?
A. FD2 and FD3
B. FD1 and FD5
C. FD5
D. FD1
Choose the correct answer from the options given below:
Consider a schema R(MNPQ) and functional dependencies M → N, P → Q. Then the decomposition of R into R1(MN) and R2(PQ) is ________.
Which of the following statements is TRUE ?
D1 : The decomposition of the schema R(A, B, C) into R1(A, B) and R2 (A, C) is always lossless.
D2 : The decomposition of the schema R(A, B, C, D, E) having AD → B, C → DE, B → AE and AE → C, into R1 (A, B, D) and R2 (A, C, D, E) is lossless.
Identify the minimal key for relational scheme R(A, B, C, D, E) with functional dependencies \(F = \{A \rightarrow B, B \rightarrow C, AC \rightarrow D\}\)
Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values.
F = {CH → G, A → BC, B → CFH, E → A, F → EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R.
The relation R is
| A | B | C | D |
|---|---|---|---|
| $a_1$ | $b_1$ | $c_1$ | $d_1$ |
| $a_2$ | $b_3$ | $c_3$ | $d_1$ |
| $a_1$ | $b_2$ | $c_1$ | $d_2$ |
Let R = ABCDE is a relational scheme with functional dependency set F = {A → B, B → C, AC → D}. The attribute closures of A and E are