Sample questions
Question 1Easy
The union rule says that from X -> Y and X -> Z we can infer:
- YZ -> X
- X -> YZ
- Y -> Z
- XY -> Z
Answer: B. X -> YZ
Explanation
Two FDs with the same left side combine their right sides.
Step-by-step solution
- X -> Y and X -> Z have the same left side.
- Whenever X is fixed, both Y and Z are fixed.
- So X -> YZ. This is the union rule.
Why the other options are wrong
- A. This reverses the direction; knowing Y and Z need not tell you X.
- C. Nothing links Y to Z directly.
- D. XY -> Z does follow (by augmentation of X -> Z), but it is not what the union rule produces.
Tip: Same left side means the right sides can be merged.
Question 2Easy
Which of the following is a trivial functional dependency?
- AB -> A
- A -> AB
- AB -> C
- A -> B
Answer: A. AB -> A
Explanation
An FD X -> Y is trivial when Y is a subset of X. A is contained in AB, so AB -> A always holds. A -> AB is not trivial since B is not part of A.
Step-by-step solution
- An FD X -> Y is trivial when Y is a subset of X.
- In AB -> A, A is part of AB.
- So it always holds in every relation.
Why the other options are wrong
- B. AB is not a subset of A, because B is new.
- C. C is not in AB.
- D. B is not in A.
Tip: Trivial = right side is inside the left side.
Question 3Easy
Which set forms Armstrong's three basic axioms?
- Union, decomposition, pseudotransitivity
- Reflexivity, augmentation, transitivity
- Reflexivity, union, decomposition
- Augmentation, decomposition, transitivity
Answer: B. Reflexivity, augmentation, transitivity
Explanation
Union, decomposition and pseudotransitivity are derived rules that can be proved from the three basic axioms.
Step-by-step solution
- The basic axioms are reflexivity, augmentation and transitivity.
- Union, decomposition and pseudotransitivity are derived rules.
- So option B is the basic set.
Why the other options are wrong
- A. These three are all derived rules.
- C. Union and decomposition are derived.
- D. Decomposition is derived, and reflexivity is missing.
Tip: Basic = R, A, T. Derived = union, decomposition, pseudotransitivity.
Question 4Easy
The attribute closure X+ is used to check whether:
- X contains NULLs
- X is atomic
- X is a foreign key
- X is a superkey
Answer: D. X is a superkey
Explanation
If X+ contains every attribute of R, X determines everything and is a superkey.
Step-by-step solution
- Start with X and repeatedly add the right side of any FD whose left side is already in the set.
- The final set is X+, everything X determines.
- If X+ contains every attribute of R, then X is a superkey.
Why the other options are wrong
- A. NULL values are about data, not about FDs.
- B. Atomicity is the 1NF property of values and is not tested by closures.
- C. A foreign key references another table; closures say nothing about that.
Tip: If X+ contains all attributes, X is a superkey; if X is also minimal, it is a candidate key.
Question 5Medium
What is a minimal (canonical) cover of F = {A->BC, B->C, A->B, AB->C}?
- A -> B, A -> C, B -> C
- A -> B, B -> C
- A -> BC
- A -> B, AB -> C
Answer: B. A -> B, B -> C
Explanation
Split to singleton right sides; B is extraneous in AB -> C, which then duplicates A -> C. A -> C itself follows from A -> B and B -> C, so it is dropped, leaving A -> B and B -> C.
Step-by-step solution
- Split right sides: A -> B, A -> C, B -> C, A -> B, AB -> C.
- AB -> C: B is extraneous, since A+ already has C, giving A -> C.
- A -> C is redundant via A -> B -> C. Remove duplicates.
- Minimal cover: A -> B, B -> C.
Why the other options are wrong
- A. A -> C is redundant because of A -> B and B -> C.
- C. It loses B -> C.
- D. It cannot derive B -> C, so it is not equivalent to F; its AB -> C also has an extraneous B.
Tip: Split right sides, trim left sides, then drop redundant FDs.
Question 6Medium
Which of the following inferences about FDs is NOT valid in general?
- From A -> B conclude AC -> B
- From A -> B and A -> C conclude A -> BC
- From AB -> C conclude A -> C
- From A -> BC conclude A -> B
Answer: C. From AB -> C conclude A -> C
Explanation
A left side cannot be split: AB -> C does not mean A alone determines C. Decomposition, union and augmentation (the other three) are all valid.
Step-by-step solution
- AB -> C needs both A and B to fix C.
- A alone may not determine C.
- Counter-example: rows (1, 1, x) and (1, 2, y) satisfy AB -> C but break A -> C.
Why the other options are wrong
- A. Augmentation-style: adding to the left side keeps an FD valid.
- B. This is the union rule, which is valid.
- D. This is the decomposition rule, which is valid.
Tip: Left side can grow, right side can split; the left side never shrinks.
Question 7Medium
In the FD set {AB -> C, A -> B}, which attribute is extraneous?
- B in AB -> C
- B in A -> B
- None; both FDs are already minimal
- A in AB -> C
Answer: A. B in AB -> C
Explanation
A+ = {A, B, C} using A -> B and then AB -> C, so A alone determines C and B can be removed from AB -> C.
Step-by-step solution
- Test B in AB -> C: compute A+ with all FDs.
- A -> B gives B, then AB -> C gives C, so A+ contains C.
- So A -> C suffices and B is extraneous.
Why the other options are wrong
- B. A -> B has one attribute on each side; nothing can be removed.
- C. B in AB -> C is extraneous.
- D. B+ = B, which has no C, so A is needed.
Tip: If A -> B, then B adds nothing on a left side next to A.
Question 8Medium
If K is a superkey of R, which FD always holds?
- K -> nothing (only trivial FDs)
- K -> every attribute of R
- K is determined by each of its subsets
- Every attribute of R -> K
Answer: B. K -> every attribute of R
Explanation
By definition a superkey's closure is the whole relation, so K functionally determines all attributes.
Step-by-step solution
- A superkey's value identifies a single tuple.
- So it fixes every other attribute value.
- Hence K -> every attribute of R.
Why the other options are wrong
- A. A key determines everything, not only trivial FDs.
- C. Subsets of a superkey need not determine it.
- D. Non-key attributes cannot determine the key in general.
Tip: K is a superkey exactly when K+ = all attributes.
Question 9Hard
F = {A -> B, B -> A, A -> C}. How many FDs, including trivial ones, with a single attribute on each side (X -> Y, X and Y each one of A, B, C) are in F+?
- 5
- 9
- 7
- 6
Answer: C. 7
Explanation
Trivial: A->A, B->B, C->C.
Non-trivial: A->B, A->C, B->A and B->C (B -> A -> C).
C determines nothing else.
Total 3 + 4 = 7.
Step-by-step solution
- Trivial: A -> A, B -> B, C -> C (3).
- Given and derived: A -> B, B -> A, A -> C, and B -> C via B -> A -> C (4).
- C+ = {C}, so nothing else comes from C. Total = 7.
Why the other options are wrong
- A. 5 misses either the trivial FDs or B -> C.
- B. 9 counts all pairs, but C -> A and C -> B do not hold.
- D. 6 misses the derived FD B -> C.
Tip: For each X, count the attributes in X+.
Question 10Hard
What is a minimal (canonical) cover of F = {A->B, ABCD->E, EF->G, EF->H, ACDF->EG}?
- A -> B, BCD -> E, EF -> GH
- A -> B, ACD -> E, EF -> G, EF -> H, ACDF -> G
- A -> B, ABCD -> E, EF -> G, EF -> H
- A -> B, ACD -> E, EF -> G, EF -> H
Answer: D. A -> B, ACD -> E, EF -> G, EF -> H
Explanation
B is extraneous in ABCD -> E because A -> B, giving ACD -> E. ACDF -> E and ACDF -> G then follow from ACD -> E and EF -> G, so both are redundant.
Step-by-step solution
- A -> B makes B extraneous in ABCD -> E, giving ACD -> E.
- ACDF -> EG: ACDF+ gets E from ACD -> E, then G from EF -> G, so it is redundant.
- Keep EF -> G and EF -> H.
- Cover: A -> B, ACD -> E, EF -> G, EF -> H.
Why the other options are wrong
- A. BCD -> E is wrong; A is needed, B is the extraneous one.
- B. ACDF -> G is redundant.
- C. B in ABCD -> E is extraneous.
Tip: Drop B from the left side if the rest still determines the right side.
Practise all 26 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →