Relational Schema · Databases
18 questions · asked in 13 of 27 years (2000–2026)
MCQ 10 · MSQ 3 · NAT 51-mark 13 · 2-mark 5
2000Questions per year2026
Questions 1–5 of 18
Let and be the attributes of a relation in a relational schema. Let indicate functional dependency in the context of a relational database, where .
Which of the following options is/are always true?
Which of the following options is/are always true?
One or more options are correct.
Answer: (C), (D)
Check each claim with Armstrong's axioms (reflexivity, augmentation, transitivity):
- (A) Given {P,Q}→{R} and {P}→{R}, does {Q}→{R} follow? No. {P}→{R} already gives {P,Q}→{R} by augmentation, so the premises do not force {Q}→{R}. Not always true.
- (B) Given {P,Q}→{R}, does {P}→{R} or {Q}→{R} follow? No. {R} may need P and Q together. For example, R may depend on the pair but on neither attribute alone. Not always true.
- (C) Given {P}→{R} and {Q}→{S}, does {P,Q}→{R,S} follow? Yes. Augment {P}→{R} with Q to get {P,Q}→{R,Q}. Augment {Q}→{S} with P to get {P,Q}→{P,S}. Reflexivity gives {R,Q}→{R} and {P,S}→{S}. With transitivity this gives {P,Q}→{R} and {P,Q}→{S}. The union rule then gives {P,Q}→{R,S}. Always true.
- (D) Given {P}→{R}, does {P,Q}→{R} follow? Yes, directly by the augmentation axiom. Adding Q to the left side of a valid FD keeps it valid. Always true.
Answer: (C), (D)
- (A) Given {P,Q}→{R} and {P}→{R}, does {Q}→{R} follow? No. {P}→{R} already gives {P,Q}→{R} by augmentation, so the premises do not force {Q}→{R}. Not always true.
- (B) Given {P,Q}→{R}, does {P}→{R} or {Q}→{R} follow? No. {R} may need P and Q together. For example, R may depend on the pair but on neither attribute alone. Not always true.
- (C) Given {P}→{R} and {Q}→{S}, does {P,Q}→{R,S} follow? Yes. Augment {P}→{R} with Q to get {P,Q}→{R,Q}. Augment {Q}→{S} with P to get {P,Q}→{P,S}. Reflexivity gives {R,Q}→{R} and {P,S}→{S}. With transitivity this gives {P,Q}→{R} and {P,Q}→{S}. The union rule then gives {P,Q}→{R,S}. Always true.
- (D) Given {P}→{R}, does {P,Q}→{R} follow? Yes, directly by the augmentation axiom. Adding Q to the left side of a valid FD keeps it valid. Always true.
Answer: (C), (D)
Consider a relational database schema with a relation . If and are the only two candidate keys of the relation , then the number of superkeys of relation is ________. (answer in integer)
Answer: 6
A superkey is any set of attributes that has at least one candidate key inside it. The relation has attributes, which are . The candidate keys are and .
Take the subsets of that contain . Choose the other attributes in any way → subsets.
Take the subsets that contain . Choose the other attributes in any way → subsets.
Some subsets are counted two times. These contain both and , which means they contain . Choose the last attribute in any way → subsets.
Using inclusion-exclusion, the total number of superkeys .
Answer: 6
Take the subsets of that contain . Choose the other attributes in any way → subsets.
Take the subsets that contain . Choose the other attributes in any way → subsets.
Some subsets are counted two times. These contain both and , which means they contain . Choose the last attribute in any way → subsets.
Using inclusion-exclusion, the total number of superkeys .
Answer: 6
Consider the following relational schema along with all the functional dependencies that hold on them.
Which of the following statement(s) is/are TRUE?
Which of the following statement(s) is/are TRUE?
One or more options are correct.
Answer: (C), (D)
R1(A,B,C,D,E) with .
A and D never appear on the right side of any FD, so no FD can give them. Every candidate key must contain both. Check : using we get . Next, gives . Then gives all of . So is a key. Any key must contain A and D, so it is the only candidate key.
Now test for 3NF. Is a superkey? No, since alone only reaches . Is a prime attribute (part of a candidate key)? No, since the only key is and it does not contain . Neither condition holds, so this FD breaks 3NF. R1 is NOT in 3NF.
R2(A,B,C,D) with .
C never appears on the right side of any FD, so every candidate key must contain C. Check : using we get . Then gives all of . So alone is the only candidate key.
Now test . Is a superkey? No, since alone reaches and misses . Is prime? No, since the key is only . This FD also breaks 3NF. R2 is NOT in 3NF.
So (A) and (B) are false, and (C) and (D) are true.
Answer: (C), (D)
A and D never appear on the right side of any FD, so no FD can give them. Every candidate key must contain both. Check : using we get . Next, gives . Then gives all of . So is a key. Any key must contain A and D, so it is the only candidate key.
Now test for 3NF. Is a superkey? No, since alone only reaches . Is a prime attribute (part of a candidate key)? No, since the only key is and it does not contain . Neither condition holds, so this FD breaks 3NF. R1 is NOT in 3NF.
R2(A,B,C,D) with .
C never appears on the right side of any FD, so every candidate key must contain C. Check : using we get . Then gives all of . So alone is the only candidate key.
Now test . Is a superkey? No, since alone reaches and misses . Is prime? No, since the key is only . This FD also breaks 3NF. R2 is NOT in 3NF.
So (A) and (B) are false, and (C) and (D) are true.
Answer: (C), (D)
The symbol indicates functional dependency in the context of a relational database. Which of the following options is/are TRUE?
One or more options are correct.
Answer: (B), (C), (D)
- (A) does not give . Y may be needed so this is FALSE.
- (B) Decomposition rule: This is TRUE.
- (C) Pseudo-transitivity: (augment by X). We also have , so This is TRUE.
- (D) Transitivity: This is TRUE.
Answer: (B), (C), (D)
- (B) Decomposition rule: This is TRUE.
- (C) Pseudo-transitivity: (augment by X). We also have , so This is TRUE.
- (D) Transitivity: This is TRUE.
Answer: (B), (C), (D)
A functional dependency is termed as a useful functional dependency if and only if it satisfies all the following three conditions:
is not the empty set. is not the empty set. Intersection of and is the empty set.
For a relation with 4 attributes, the total number of possible useful functional dependencies is ______
is not the empty set. is not the empty set. Intersection of and is the empty set.
For a relation with 4 attributes, the total number of possible useful functional dependencies is ______
Answer: 50
X and Y must both be non-empty and have nothing in common. Every one of the 4 attributes can be put in X, in Y, or in neither: ways.
Take away the cases where X is empty () and where Y is empty (). Then add back the case where both are empty (1):
Answer: 50
Take away the cases where X is empty () and where Y is empty (). Then add back the case where both are empty (1):
Answer: 50
Keep practising
Topics in Databases
ER Model
Relational SchemaYou are here
Relational AlgebraTuple CalculusSQLIntegrity ConstraintsNormal FormFile SystemTransaction