chapter

    Functional Dependencies, Keys and Normalization Short Notes for Gate Cs

    Functional Dependencies, Keys and Normalization short notes for GATE CS: 3 study cards covering concepts, formulas, shortcuts and exam traps, plus solved prac

    Functional Dependencies Keys and Normalization short notes

    Armstrong's Axioms and FD Inference: Quick Reference

    Quick Reference

    Core Axioms: Reflexivity, Augmentation, Transitivity
    Derived Rules: Union, Decomposition, Pseudotransitivity
    Inference test:
    Trivial FD: (always true)
    Useful FD:
    Common traps: FDs are not symmetric. Cannot shrink left side. Cannot expand right side alone.

    Keys and Closures: Final Revision Checklist

    Final Revision Checklist
    Core Definitions
    • Superkey:
    • Candidate Key: Minimal superkey
    • Prime Attribute: Part of candidate key
    Finding Candidate Keys (L-R-LR-N)
    • L & N: Must be in every candidate key
    • R: Never in any candidate key
    • LR: Test combinations to achieve full closure
    Counting Superkeys
    1 CK:
    Multiple CKs: Inclusion-Exclusion
    Exam Traps
    • Do not confuse superkeys with candidate keys (minimality matters).
    • Always subtract intersections for multiple CKs.
    • Attributes in 'N' are mandatory in every CK.

    Normal Forms and Decomposition: Final Checklist

    Final Revision Checklist
    Normal Forms
    • 1NF: Atomic values.
    • 2NF: No partial dependency (Non-prime Part of Key).
    • 3NF: No transitive dependency (Non-prime Non-prime). Rule: iff is Superkey OR is Prime.
    • BCNF: Strict. Rule: iff is Superkey.
    Decomposition Properties
    • Lossless Join: is superkey of or .
    • Dependency Preserving: Every FD in is contained in some .
    Golden Rule:
    3NF: Always Lossless + Dependency Preserving.
    BCNF: Always Lossless, but MAY NOT be Dependency Preserving.

    Try a question

    Answer it here to see how it works. Nothing is recorded until you sign in.

    Question 1
    Level 1: Warm-up

    Translate the following description into the order in which attributes enter the closure during the standard attribute-closure algorithm on starting from :

    "Begin with ; repeatedly append the right-hand sides of every dependency whose left-hand side is already contained in the current result, until nothing new can be appended."

    Rank the attributes by the round in which they first appear (round 1 = initial set). Choose the correct ordering of first-appearance rounds for .

    Question 2
    Level 1: Warm-up

    A student is listing the inference rules for functional dependencies and wants to identify the minimum set of core axioms that are both sound and complete. They list: Reflexivity, Augmentation, Transitivity, Union, Decomposition, and Pseudotransitivity. How many of these should be counted as core axioms to avoid overcounting derived rules?

    Question 3
    Level 1: Warm-up

    A student lists the following rules for deriving functional dependencies: Reflexivity, Augmentation, Transitivity, Union, Decomposition, Pseudotransitivity, and Symmetry. They claim that all of these are core Armstrong's axioms. What is the minimum number of rules they must remove to be left with only the core axioms?

    Question 4
    Level 1: Warm-up

    Using the attribute closure algorithm on , consider the closures of and . Which statement is TRUE?

    Question 5
    Level 1: Warm-up

    Consider a relation with functional dependencies , , and . What is the MINIMUM number of attributes that MUST be present in every candidate key of ?

    Question 6
    Level 1: Warm-up

    Consider the standard attribute closure algorithm applied to the set of functional dependencies . When computing the closure of the set , in which step (1-indexed) does the attribute first enter the closure set?

    Question 7
    Level 1: Warm-up

    Consider a relation decomposed into and . Which of the following functional dependencies guarantee that the decomposition is lossless?

    Question 8
    Level 1: Warm-up

    A relation schema has exactly $3$ attributes. A functional dependency $X \rightarrow Y$ is defined as "useful" if $X \neq \emptyset$, $Y \neq \emptyset$, and $X \cap Y = \emptyset$. What is the maximum number of useful functional dependencies that can be defined on this schema?

    Question 9
    Level 1: Warm-up

    Consider a relation with the single candidate key .

    Consider the following functional dependencies:

    How many of the above functional dependencies are IMPOSSIBLE to exist if the relation is strictly in Boyce-Codd Normal Form (BCNF)?

    Question 10
    Level 1: Warm-up

    A relation schema has 3 attributes. A functional dependency is completely non-trivial if , , and . What is the maximum number of such completely non-trivial functional dependencies that can be defined on this schema?

    Free preview ends here

    Login to view the complete short notes

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Explore complete test series, official past papers, and chapter-wise study tools.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Functional Dependencies, Keys and Normalization Short Notes for GATE CS

    Functional Dependencies, Keys and Normalization short notes for GATE CS: 3 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice questions.

    Armstrong's Axioms and FD Inference: Quick Reference

    Quick Reference

    Core Axioms: Reflexivity, Augmentation, Transitivity
    Derived Rules: Union, Decomposition, Pseudotransitivity
    Inference test:
    Trivial FD: (always true)
    Useful FD:
    Common traps: FDs are not symmetric. Cannot shrink left side. Cannot expand right side alone.

    Keys and Closures: Final Revision Checklist

    Final Revision Checklist
    Core Definitions
    • Superkey:
    • Candidate Key: Minimal superkey
    • Prime Attribute: Part of candidate key
    Finding Candidate Keys (L-R-LR-N)
    • L & N: Must be in every candidate key
    • R: Never in any candidate key
    • LR: Test combinations to achieve full closure
    Counting Superkeys
    1 CK:
    Multiple CKs: Inclusion-Exclusion
    Exam Traps
    • Do not confuse superkeys with candidate keys (minimality matters).
    • Always subtract intersections for multiple CKs.
    • Attributes in 'N' are mandatory in every CK.

    Normal Forms and Decomposition: Final Checklist

    Final Revision Checklist
    Normal Forms
    • 1NF: Atomic values.
    • 2NF: No partial dependency (Non-prime Part of Key).
    • 3NF: No transitive dependency (Non-prime Non-prime). Rule: iff is Superkey OR is Prime.
    • BCNF: Strict. Rule: iff is Superkey.
    Decomposition Properties
    • Lossless Join: is superkey of or .
    • Dependency Preserving: Every FD in is contained in some .
    Golden Rule:
    3NF: Always Lossless + Dependency Preserving.
    BCNF: Always Lossless, but MAY NOT be Dependency Preserving.

    Functional Dependencies, Keys and Normalization: Solved Questions with Step-by-Step Explanations (10 Problems)

    Question 1 · Databases MCQ

    Translate the following description into the order in which attributes enter the closure during the standard attribute-closure algorithm on starting from :

    "Begin with ; repeatedly append the right-hand sides of every dependency whose left-hand side is already contained in the current result, until nothing new can be appended."

    Rank the attributes by the round in which they first appear (round 1 = initial set). Choose the correct ordering of first-appearance rounds for .

    1. A.

      in round 2, in round 3, in round 4

    2. B.

      all in round 2

    3. C.

      in round 2, in round 2, in round 3

    4. D.

      in round 3, in round 2, in round 4

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: This is an order-ranking question translating the iterative closure procedure into concrete rounds.

    Step 1: Round 1: result .

    Step 2: Round 2: scan . applies (), append . does not yet apply. New result . First appearance of = round 2.

    Step 3: Round 3: now applies (), append . Result . First appearance of = round 3.

    Step 4: Round 4: now applies, append . Result . First appearance of = round 4.

    Ordering: B(2), C(3), D(4). Answer: A

    Wrong path: Believing all applicable-at-start FDs fire simultaneously regardless of newly added attributes causes option B/C-style answers; this overcounts early additions.

    Question 2 · Databases MCQ

    A student is listing the inference rules for functional dependencies and wants to identify the minimum set of core axioms that are both sound and complete. They list: Reflexivity, Augmentation, Transitivity, Union, Decomposition, and Pseudotransitivity. How many of these should be counted as core axioms to avoid overcounting derived rules?

    1. A.

      2

    2. B.

      3

    3. C.

      4

    4. D.

      6

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a contradiction question that tests the distinction between fundamental axioms and derived shortcuts, recognizable by the list of rules and the request for the "minimum set of core axioms".

    Step 1: Recall Armstrong's Axioms. The fundamental, core axioms that form a sound and complete basis are exactly three: Reflexivity, Augmentation, and Transitivity.

    Step 2: Evaluate the other rules in the list. Union, Decomposition, and Pseudotransitivity are not core axioms; they are derived rules that can be proven using the three core axioms.

    Step 3: Count only the core axioms to avoid overcounting. The count is 3.

    Answer: 3.

    Question 3 · Databases MCQ

    A student lists the following rules for deriving functional dependencies: Reflexivity, Augmentation, Transitivity, Union, Decomposition, Pseudotransitivity, and Symmetry. They claim that all of these are core Armstrong's axioms. What is the minimum number of rules they must remove to be left with only the core axioms?

    1. A.

      2

    2. B.

      3

    3. C.

      4

    4. D.

      5

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: This is a contradiction question that tests the distinction between fundamental axioms and derived or invalid rules, recognizable by the list of rules and the request for the minimum to remove.

    Step 1: Identify the core Armstrong's axioms from the list. There are exactly 3: Reflexivity, Augmentation, and Transitivity.

    Step 2: Count the total number of rules listed: 7 (Reflexivity, Augmentation, Transitivity, Union, Decomposition, Pseudotransitivity, Symmetry).

    Step 3: Calculate the minimum number to remove: .

    Answer: 4.

    Question 4 · Databases MCQ

    Using the attribute closure algorithm on , consider the closures of and . Which statement is TRUE?

    1. A.

      and

    2. B.

      and

    3. C.

      and

    4. D.

      and

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a statement-truth comparison question testing correct closure computation for two different starting sets.

    Step 1: Compute . Start . Apply ⇒ . does not apply (). Final .

    Step 2: Compute . Start . Apply ⇒ . Apply ⇒ . Final .

    Step 3: Compare with options. Only B matches both results.

    Answer: B

    Wrong path: Option A wrongly pulls into by assuming fires without being present — a formula-misapplication error.

    Question 5 · Databases MCQ

    Consider a relation with functional dependencies , , and . What is the MINIMUM number of attributes that MUST be present in every candidate key of ?

    1. A.

      1

    2. B.

      2

    3. C.

      3

    4. D.

      4

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: Use the L-R-LR-N heuristic to find mandatory attributes for candidate keys.

    Step 1: Classify each attribute based on its appearance in the given FDs.

    • : appears on LHS and RHS LR
    • : appears only on RHS R
    • : appears only on LHS L
    • : appears only on RHS R
    • : appears only on LHS L

    Step 2: Attributes in L and N MUST be part of every candidate key.

    Step 3: Here, L = and N = .

    Step 4: Therefore, must be in every candidate key. The minimum number of mandatory attributes is 2.

    Question 6 · Databases NAT

    Consider the standard attribute closure algorithm applied to the set of functional dependencies . When computing the closure of the set , in which step (1-indexed) does the attribute first enter the closure set?

    Correct Answer:

    3.00

    Step-by-Step Solution

    Key idea: The attribute closure algorithm starts with the initial set and repeatedly adds right sides of applicable FDs until no more can be added.

    Step 1: Initialize the closure with .

    Step 2: Apply . The closure becomes . (This is Step 1).

    Step 3: Apply . The closure becomes . (This is Step 2).

    Step 4: Apply . The closure becomes . (This is Step 3).

    Step 5: The attribute first enters the closure set in Step 3.

    Answer: 3.00

    Question 7 · Databases MSQ

    Consider a relation decomposed into and . Which of the following functional dependencies guarantee that the decomposition is lossless?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    ["A","B"]

    Step-by-Step Solution

    Key idea: A decomposition into and is lossless if the intersection of their schemas is a superkey for or .

    Step 1: Find the intersection. .

    Step 2: Check if is a superkey for or .

    Step 3: Evaluate Option A. means , which is all of . Thus, is a superkey for . (True)

    Step 4: Evaluate Option B. means , which is all of . Thus, is a superkey for . (True)

    Step 5: Evaluate Options C and D. and do not make the intersection a superkey for either or . (False)

    Answer: A, B

    Question 8 · Databases NAT

    A relation schema has exactly $3$ attributes. A functional dependency $X \rightarrow Y$ is defined as "useful" if $X \neq \emptyset$, $Y \neq \emptyset$, and $X \cap Y = \emptyset$. What is the maximum number of useful functional dependencies that can be defined on this schema?

    Correct Answer:

    12.00

    Step-by-Step Solution

    Key idea: This is a combinatorial counting question for useful functional dependencies, recognizable by the conditions that and must be disjoint and non-empty.

    Step 1: For each of the attributes, it can either belong to , belong to , or belong to neither. This gives total assignments.

    Step 2: Subtract the invalid cases where (which gives assignments, as each attribute is either in or neither) and where (another assignments).

    Step 3: Add back the intersection where both and (which is case) to avoid double subtraction.

    Formula: .

    For : .

    Answer: 12.00

    Question 9 · Databases NAT

    Consider a relation with the single candidate key .

    Consider the following functional dependencies:

    How many of the above functional dependencies are IMPOSSIBLE to exist if the relation is strictly in Boyce-Codd Normal Form (BCNF)?

    Correct Answer:

    3.00

    Step-by-Step Solution

    Key idea: This is an observation question for BCNF strictness, recognizable because it asks to identify impossible functional dependencies based on the superkey condition.

    Step 1: In BCNF, for every functional dependency , MUST be a superkey. There are no exceptions for prime attributes.

    Step 2: The candidate key is , so the only superkey is (and its supersets, but here attributes are single).

    Step 3: Evaluate each FD.

    • FD 1: . is a superkey. Possible.
    • FD 2: . is not a superkey. Impossible.
    • FD 3: . is not a superkey. Impossible (even though is prime, BCNF does not allow this).
    • FD 4: . is not a superkey. Impossible.

    Step 4: Count the impossible FDs. FDs 2, 3, and 4 are impossible. Total = 3.

    Answer: 3.00

    Question 10 · Databases MCQ

    A relation schema has 3 attributes. A functional dependency is completely non-trivial if , , and . What is the maximum number of such completely non-trivial functional dependencies that can be defined on this schema?

    1. A.

      11

    2. B.

      12

    3. C.

      19

    4. D.

      27

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is an observation question about the boundary conditions of set intersections, recognizable by the term "completely non-trivial" which requires disjoint sets.

    Step 1: For and to be disjoint, each of the attributes has 3 choices: in , in , or in neither. This gives total assignments.

    Step 2: We must enforce the boundary conditions that neither nor is empty.

    • Subtract cases where is empty: (attributes in or neither).
    • Subtract cases where is empty: (attributes in or neither).
    • Add back the case where both are empty (since it was subtracted twice): .

    Step 3: The formula is .

    Step 4: Substitute : .

    Answer: 12.

    More short notes in this unit