Database design functional dependencies and Normalization GATE (2021-2026)- PYQ (Q2.51 to Q2.63)

2.51 [GATE 2021 Set-2 : 2 Marks]

Question:
Suppose the following functional dependencies hold on a relation U with attributes P, Q, R, S and T:
P -> QR
RS -> T
Which of the following functional dependencies can be inferred from the above?
(a) PS -> T
(b) P -> R
(c) R -> T
(d) PS -> Q

Answer: (a) PS -> T, (b) P -> R, (d) PS -> Q can be inferred. R -> T cannot be inferred.

Solution:
P -> QR का मतलब P -> Q और P -> R दोनों हैं।
P+ = P + QR = {P,Q,R}

PS+ निकालो:
PS = P,S -> Q,R (P->QR से) -> अब R और S दोनों आ गए, RS -> T से T भी आ गया।
तो PS+ = {P,Q,R,S,T}

Check:
(a) PS -> T: PS+ में T है -> True
(b) P -> R: P+ में R है -> True
(c) R -> T: R+ = {R} only, T नहीं आता -> False
(d) PS -> Q: PS+ में Q है -> True

1-Line Trick: PS से R और S दोनों मिलते हैं, तो RS->T से T आ जाता है।

2.52 [GATE 2022 : 1 Mark]

Question:
In a relational data model, which one of the following statements is TRUE?
(a) A relation with only two attributes is always in BCNF.
(b) If all attributes of a relation are prime attributes, then the relation is in BCNF.
(c) Every relation has at least one non-prime attribute.
(d) BCNF decompositions preserve functional dependencies.

Answer: (a) A relation with only two attributes is always in BCNF.

Solution:
(a) TRUE: 2 Attribute वाली हर Relation BCNF में होती है। या तो A->B होगा या B->A या दोनों। हर बार LHS Superkey बनता है।
(b) FALSE: सारे Prime होने पर Relation हमेशा 3NF में होती है, BCNF में होना जरूरी नहीं। Example: R(A,B,C) with AB->C, C->B। Keys AB, AC। सारे Prime? No, but Counter Example Exists।
(c) FALSE: हो सकता है Relation में कोई Non-Prime ही ना हो, सारे Prime हों।
(d) FALSE: BCNF Decomposition हमेशा Lossless होती है, पर Dependency Preserving होना जरूरी नहीं, Fail हो सकती है।

1-Line Trick: 2 Attributes = Auto BCNF, All Prime = Only 3NF Guarantee।

2.53 [GATE 2022 : 1 Mark]

Question:
Consider a relation R(A, B, C, D, E) with the following three functional dependencies.
AB -> C; BC -> D; C -> E;
The number of superkeys in the relation R is __?

Answer: 8

Solution:
AB -> C, BC -> D, C -> E
A,B कभी RHS में नहीं आते, तो A,B हर Key में होंगे।
AB+ = AB + C (AB->C) + D (BC->D क्योंकि B,C आ गए) + E (C->E) = ABCDE = सब।
तो AB Candidate Key है।
Total Attributes = 5, Key Size = 2
Superkeys = 2^(n – key_size) = 2^(5-2) = 2^3 = 8
List: AB, ABC, ABD, ABE, ABCD, ABCE, ABDE, ABCDE

1-Line Trick: AB Key है तो बाकी 3 में से जो मर्जी जोड़ो = 2^3 = 8 Superkeys।

2.54 [GATE 2024 Set-1 : 1 Mark]

Question:
Which of the following statements about a relation R in first normal form (1NF) is/are TRUE?
(a) R cannot have a composite attribute
(b) R cannot have a foreign key
(c) R can have a multi-attribute key
(d) R cannot have more than one candidate key

Answer: (a) and (c)

Solution:
1NF का Rule सिर्फ इतना है – हर Attribute Atomic होना चाहिए, Multi-Valued नहीं होना चाहिए।
(a) TRUE – Composite Attribute का मतलब Attribute के अंदर Sub-Attributes हैं, ये Atomic नहीं है, तो 1NF Fail।
(b) FALSE – Foreign Key का 1NF से कोई लेना-देना नहीं, 1NF में FK हो सकता है।
(c) TRUE – 1NF में Multi-Attribute Key (Composite Key) हो सकता है।
(d) FALSE – 1NF में Multiple Candidate Keys हो सकते हैं।

1-Line Trick: 1NF = Atomic Value, बाकी सब Allowed है।

2.55 [GATE 2024 Set-1 : 2 Marks]

Question:
The symbol -> indicates functional dependency in the context of a relational database. Which of the following options is/are TRUE?
(a) (X -> Y and Y -> Z) implies X -> Z
(b) (X, Y) -> (Z, W) implies X -> (Z, W)
(c) ((X, Y) -> Z and W -> Y) implies (X, W) -> Z
(d) (X, Y) -> (Z, W) implies (X, Y) -> Z

Answer: (a), (c), (d)

Solution:
(a) TRUE – Transitivity Rule: X->Y, Y->Z => X->Z
(b) FALSE – (X,Y)->(Z,W) का मतलब दोनों मिलकर Determine कर रहे हैं, अकेला X नहीं करेगा। Decomposition उल्टा नहीं होता।
(c) TRUE – Pseudo-Transitivity: (X,Y)->Z और W->Y से Y को W से Replace कर सकते हैं => (X,W)->Z
(d) TRUE – Decomposition Rule: (X,Y)->(Z,W) => (X,Y)->Z और (X,Y)->W दोनों True।

1-Line Trick: (b) में LHS से Attribute हटाना Allowed नहीं।

2.56 [GATE 2024 Set-2 : 2 Marks]

Question:
A functional dependency F: X -> Y is termed as a useful functional dependency if and only if it satisfies all the following three conditions:

  • X is not the empty set.
  • Y is not the empty set.
  • Intersection of X and Y is the empty set.
    For a relation R with 4 attributes, the total number of possible useful functional dependencies is __?

Answer: 50

Solution:
Har Attribute के लिए 3 Choice है: X में जाएगा, Y में जाएगा, या कहीं नहीं जाएगा। Total = 3^4 = 81.
इसमें से X Empty वाले Cases हटाओ = 2^4 = 16, Y Empty वाले हटाओ = 2^4 = 16, दोनों Empty वाला 1 Case 2 बार घट गया तो वापस जोड़ो।
Formula = 3^n – 22^n + 1 = 3^4 – 22^4 + 1 = 81 – 32 + 1 = 50.
Disjoint और Non-Empty वाला Condition से यही Count आता है।

1-Line Trick: Useful FD Count = 3^n – 2^(n+1) + 1 = 50 for n=4.

2.57 [GATE 2025 Set-1 : 2 Marks]

Question:
Consider a relational schema team(name, city, owner), with functional dependencies {name -> city, city, name -> owner}.
The relation team is decomposed into two relations, t1(name, city) and t2(name, owner).
Which of the following statement(s) is/are TRUE?
(a) The relation team is NOT in BCNF.
(b) The relations t1 and t2 are in BCNF.
(c) The decomposition constitutes a lossless join.
(d) The relation team is NOT in 3NF.

Answer: (b) and (c)

Solution:
Key निकालो: name+ = name -> city (name->city से) -> अब name,city आ गया -> owner (city,name->owner से) = name,city,owner सब। तो name ही Key है।
team: name->city में LHS name Superkey है, city,name->owner में भी LHS में name है जो Superkey है, तो team BCNF में है। इसलिए (a) False, (d) False।
t1(name,city): name->city, name Key है t1 का = BCNF.
t2(name,owner): name->owner, name Key है t2 का = BCNF. तो (b) True.
Lossless: Common Attribute = name, और name t1 का Superkey है, तो Lossless Join True। तो (c) True।

1-Line Trick: name ही पूरी Relation का Key है, तो सब BCNF और Lossless भी।

2.58 [GATE 2025 : 2 Marks]

Question:
Consider the following relational schema along with all the functional dependencies that hold on them.
R1(A, B, C, D, E): {D -> E, EA -> B, EB -> C}
R2(A, B, C, D): {A -> D, A -> B, C -> A}
Which of the following statement(s) is/are TRUE?
(a) R1 is in 3NF
(b) R2 is in 3NF

Answer: (a) False, (b) False – Both are NOT in 3NF

Solution:
R1: AD Key है। AD+ = A,D -> E(D->E) -> B(EA->B) -> C(EB->C) = ABCDE सब।
Prime = A,D, Non-Prime = B,C,E
FD D->E देखो: D Superkey नहीं है, E Non-Prime है = 3NF Fail। इसलिए R1 Not in 3NF।

R2: C Key है। C+ = C -> A(C->A) -> D,B(A->D,A->B) = ABCD सब।
Prime = C, Non-Prime = A,B,D
FD A->D देखो: A Superkey नहीं है, D Non-Prime है = 3NF Fail। इसलिए R2 भी Not in 3NF।

1-Line Trick: Non-Key -> Non-Prime मिलते ही 3NF Fail – दोनों में वही है।

2.60 [GATE 2026 Set-1 : 1 Mark]

Question:
Let P, Q, R, S be the attributes of a relation in a relational schema. Let X -> Y indicate functional dependency in the context of a relational database, where X, Y ⊆ {P, Q, R, S}. Which of the following options is/are always true?
(a) If {P, Q} -> {R} and {P} -> {R}, then {Q} -> {R}
(b) If {P, Q} -> {R}, then ({P} -> {R} or {Q} -> {R})
(c) If {P} -> {R} and {Q} -> {S}, then {P, Q} -> {R, S}
(d) If {P} -> {R}, then {P, Q} -> {R}

Answer: (c) and (d)

Solution:
(a) False: P->R है तो {P,Q}->R में Q तो Extra है, इससे Q->R कभी Prove नहीं होगा।
(b) False: {P,Q} मिलकर R को Determine कर रहे हैं, अकेला P या Q नहीं कर सकता। Example: StudentID, CourseID -> Grade।
(c) True: ये Composition Rule है। Augmentation से {P}->{R} => {P,Q}->{R,Q} और {Q}->{S} => {R,Q}->{R,S} फिर Transitivity से {P,Q}->{R,S}।
(d) True: ये Augmentation Axiom है। P->R है तो LHS में Q जोड़ने से Dependency टूटती नहीं, {P,Q}->R भी True रहेगा।

1-Line Trick: LHS में Attribute जोड़ना हमेशा Valid (Augmentation), तोड़ना Invalid।

2.61 [GATE 2026 Set-1 : 1 Mark]

Question:
In the context of relational database normalization, which of the following statements is/are true?
(a) It is always possible to obtain a dependency-preserving 3NF decomposition of a relation
(b) It is always possible to obtain a dependency-preserving 1NF decomposition of a relation
(c) It is not always possible to obtain a dependency-preserving BCNF decomposition of a relation
(d) It is not always possible to obtain a dependency-preserving 2NF decomposition of a relation

Answer: (a), (b) and (c)

Solution:
(a) True: ये Standard Theorem है – हर Relation का Lossless + Dependency Preserving 3NF Decomposition हमेशा Possible है।
(b) True: 1NF का मतलब सिर्फ Atomic Value, इसमें कोई Decomposition ही नहीं चाहिए, इसलिए Dependency तो Preserve ही है।
(c) True: BCNF में Lossless तो हमेशा Possible है, पर Dependency Preserving हमेशा Possible नहीं है। Example: R(A,B,C) with AB->C, C->B।
(d) False: 2NF का भी Dependency Preserving Decomposition हमेशा Possible है, क्योंकि 2NF, 3NF से कम Strict है।

1-Line Trick: 3NF तक Dependency Preserve पक्का, BCNF में नहीं।

2.62 [GATE 2026 Set-2 : 2 Marks]

Question:
In the context of schema normalization in relational DBMS, consider a set F of functional dependencies. The set of all functional dependencies implied by F is called the closure of F. To compute the closure of F, Armstrong’s Axioms can be applied. Consider X, Y and Z as sets of attributes over a relational schema. The three rules of Armstrong’s Axioms are described as follows.
Reflexivity: If Y ⊆ X, then X -> Y
Augmentation: If X -> Y, then XZ -> YZ for any Z
Transitivity: If X -> Y and Y -> Z, then X -> Z
The additional rule of Union is defined as follows.
Union: If X -> Y and X -> Z, then X -> YZ
It can be proved that the additional rule of Union is also implied by the three rules of Armstrong’s Axioms. Listed below are four combinations of these three rules. Which one of these combinations is both necessary and sufficient for the proof?
(a) Reflexivity, Augmentation, and Transitivity
(b) Reflexivity and Augmentation
(c) Transitivity
(d) Augmentation and Transitivity

Answer: (d) Augmentation and Transitivity

Solution:
Union Rule Proof: X->Y और X->Z दिया है।

  1. X->Y से Augmentation से X -> XY (Z=X मान के)
  2. X->Z से Augmentation से XY -> YZ (Z=Y मान के)
  3. फिर Transitivity से X->XY और XY->YZ => X->YZ
    इस Proof में Reflexivity की जरूरत नहीं पड़ी, सिर्फ Augmentation और Transitivity से Union Prove हो गया।

1-Line Trick: Union = Augmentation + Transitivity, Reflexivity नहीं चाहिए।

2.63 [GATE 2026 Set-1 : 2 Marks]

Question:
Consider a relational database schema with a relation R(A, B, C, D). If {A, B} and {A, C} are the only two candidate keys of the relation R, then the number of superkeys of relation R is __ (answer in integer)

Answer: 6

Solution:
Relation में 4 Attributes: A,B,C,D
Candidate Keys: AB और AC
Superkeys निकालो:
AB के Superkeys: AB के साथ बाकी {C,D} का कोई भी Subset – AB, ABC, ABD, ABCD = 4
AC के Superkeys: AC के साथ बाकी {B,D} का कोई भी Subset – AC, ABC, ACD, ABCD = 4
Common Superkeys दोनों में: ABC, ABCD = 2
Total Distinct = 4 + 4 – 2 = 6
List: AB, AC, ABC, ABD, ACD, ABCD

1-Line Trick: Formula = 2^(n-k1) + 2^(n-k2) – 2^(n – |k1 ∪ k2|) = 4+4-2 = 6

Leave a Comment

Your email address will not be published. Required fields are marked *