chapter

    Functional Dependencies and Normalization Notes for Gate Da

    Functional Dependencies and Normalization notes for GATE DA: 33 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice questi

    Functional Dependencies and Normalization notes

    Chapter Roadmap: Functional Dependencies and Normalization

    Chapter Roadmap

    1

    Functional Dependencies and Candidate Keys

    The foundation. Decoding the rules of data determination and systematically extracting minimal keys.

    2

    Normalization, BCNF and Dependency Preservation

    The application. Breaking down messy tables into clean structures to eliminate update anomalies.

    3

    Armstrong Axioms and Derived Dependencies

    The proof. Mastering the formal mathematical rules to verify and derive functional dependencies.

    Functional Dependencies and Candidate Keys

    Functional Dependencies and Candidate Keys

    A database without defined dependencies is just a chaotic bucket of text. These rules capture real-world semantics, ensuring data is logically connected and uniquely identifiable.

    What you will learn here

    • The precise definition and intuition behind Functional Dependencies.
    • How to compute the closure of an attribute set.
    • The systematic, foolproof method to find all Candidate Keys.
    • How to distinguish between Super Keys, Candidate Keys, and Prime Attributes.
    Context: This is the starting point of database design. We must understand the rules before we can normalize the tables.

    The Intuition Behind Functional Dependencies

    The Core Intuition

    A Functional Dependency (FD) is a constraint between two sets of attributes in a relation. It captures a real-world rule of determination.

    The "If-Then" Rule

    If I know the value of set , I can uniquely determine the value of set .

    • Example: If I know a StudentID, I can uniquely determine the StudentName.
    • Notation: We write this as .

    Crucial Detail

    This is a constraint on all valid instances of the relation. It is not just a pattern observed in the current data snapshot; it is a semantic rule that must hold true for any past, present, or future data.

    30 more cards in this chapter

    Try a question

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

    Question 1
    Level 1: Warm-up

    Consider the attribute closure algorithm for computing given a set of functional dependencies . Which of the following statements about the algorithm is TRUE?

    Question 2
    Level 1: Warm-up

    A relation schema has exactly 6 attributes. It is known that has exactly two candidate keys, each of size 2, and these two candidate keys share no attributes in common. What is the maximum possible number of superkeys for ?

    Question 3
    Level 1: Warm-up

    Consider a relation with candidate keys and . The functional dependency set is . How many functional dependencies in violate BCNF?

    Question 4
    Level 1: Warm-up

    Consider the following statements regarding attribute closure :

    1. If , then is a super key.
    2. If , then is definitely a candidate key.
    3. contains only attributes that are functionally determined by .

    Which of the statements are true?

    Question 5
    Level 1: Warm-up

    According to the L-R-LR-N classification method for finding candidate keys, which of the following scenarios is impossible?

    Question 6
    Level 1: Warm-up

    According to the L-R-LR-N classification method for finding candidate keys, which of the following outcomes is impossible?

    Question 7
    Level 1: Warm-up

    A relation schema has exactly 6 attributes. It is known that has exactly one candidate key, and this key consists of exactly 2 attributes. What is the maximum possible number of superkeys for ?

    Question 8
    Level 1: Warm-up

    The FD and Key Cheat Sheet states that attributes appearing only on the right side of functional dependencies are never in any candidate key. Consider a relation with . A student argues that since is at the end of the dependency chain and is "important", the set could be a candidate key. Is this argument valid, and what is the actual minimum key size?

    Question 9
    Level 1: Warm-up

    In the attribute closure algorithm for computing , we repeatedly scan the set of functional dependencies and add attributes to our result set. The algorithm terminates when a specific condition is met.

    Which of the following correctly states the termination condition?

    Question 10
    Level 1: Warm-up

    Consider a relation schema with the functional dependency . The only candidate key is .

    How many super keys of contain the attribute ?

    Free preview ends here

    Login to view the complete 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 and Normalization Notes for GATE DA

    Functional Dependencies and Normalization notes for GATE DA: 33 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice questions.

    Chapter Roadmap: Functional Dependencies and Normalization

    Chapter Roadmap

    1

    Functional Dependencies and Candidate Keys

    The foundation. Decoding the rules of data determination and systematically extracting minimal keys.

    2

    Normalization, BCNF and Dependency Preservation

    The application. Breaking down messy tables into clean structures to eliminate update anomalies.

    3

    Armstrong Axioms and Derived Dependencies

    The proof. Mastering the formal mathematical rules to verify and derive functional dependencies.

    Functional Dependencies and Candidate Keys

    Functional Dependencies and Candidate Keys

    A database without defined dependencies is just a chaotic bucket of text. These rules capture real-world semantics, ensuring data is logically connected and uniquely identifiable.

    What you will learn here

    • The precise definition and intuition behind Functional Dependencies.
    • How to compute the closure of an attribute set.
    • The systematic, foolproof method to find all Candidate Keys.
    • How to distinguish between Super Keys, Candidate Keys, and Prime Attributes.
    Context: This is the starting point of database design. We must understand the rules before we can normalize the tables.

    The Intuition Behind Functional Dependencies

    The Core Intuition

    A Functional Dependency (FD) is a constraint between two sets of attributes in a relation. It captures a real-world rule of determination.

    The "If-Then" Rule

    If I know the value of set , I can uniquely determine the value of set .

    • Example: If I know a StudentID, I can uniquely determine the StudentName.
    • Notation: We write this as .

    Crucial Detail

    This is a constraint on all valid instances of the relation. It is not just a pattern observed in the current data snapshot; it is a semantic rule that must hold true for any past, present, or future data.

    Trivial vs Non-Trivial Dependencies

    Classifying Functional Dependencies

    Trivial Dependencies

    Definition: is trivial if .

    Example: is trivial because is already part of the left side.

    Significance: Always true by definition; provides zero new information.

    Non-Trivial Dependencies

    Definition: is non-trivial if .

    Example: is non-trivial.

    Significance: Represents actual, meaningful business rules and constraints.

    Completely Non-Trivial

    Definition: (The left and right sides share absolutely no attributes).

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

    Question 1 · Database Management and Warehousing MCQ

    Consider the attribute closure algorithm for computing given a set of functional dependencies . Which of the following statements about the algorithm is TRUE?

    1. A.

      The algorithm terminates when all attributes of the relation are in the result set.

    2. B.

      In each pass, the algorithm adds the right side of an FD if the left side is a subset of the current result set.

    3. C.

      The algorithm guarantees that the closure will contain all attributes of the relation.

    4. D.

      The algorithm requires checking each FD exactly once.

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: The closure algorithm iteratively applies FDs where the left side is contained in the current result set.

    The correct algorithm:

    1. Initialize result =
    2. Repeat until result stops changing:
    • For every FD in :
    • If result, add to result
    1. Final result is

    Option B correctly describes step 2: the algorithm adds the right side of an FD if the left side is a subset of the current result set.

    Answer: B

    Question 2 · Database Management and Warehousing MCQ

    A relation schema has exactly 6 attributes. It is known that has exactly two candidate keys, each of size 2, and these two candidate keys share no attributes in common. What is the maximum possible number of superkeys for ?

    1. A.

      4

    2. B.

      16

    3. C.

      32

    4. D.

      28

    Correct Answer:

    D

    Step-by-Step Solution

    Key idea: This is a direct formula question on superkey enumeration with multiple candidate keys. When there are two candidate keys and , the number of superkeys is computed using inclusion-exclusion: (superkeys containing ) + (superkeys containing ) - (superkeys containing both).

    Step 1: Identify the parameters. attributes, , and .

    Step 2: Superkeys containing . The 2 attributes of are mandatory. The remaining attributes can be independently included or excluded. Count = .

    Step 3: Superkeys containing . Similarly, count = .

    Step 4: Superkeys containing both and . All 4 attributes of are mandatory. The remaining attributes are free. Count = .

    Step 5: Apply inclusion-exclusion. Total = .

    Answer: D (28).

    Question 3 · Database Management and Warehousing MCQ

    Consider a relation with candidate keys and . The functional dependency set is . How many functional dependencies in violate BCNF?

    1. A.

      2

    2. B.

      1

    3. C.

      3

    4. D.

      4

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: This is a construction question that tests the ability to check each FD against the BCNF condition. The trap is misreading the candidate keys or miscomputing closures.

    Step 1: Identify the candidate keys: and . So and are superkeys.

    Step 2: Check each FD.

    • : is a candidate key, so is a superkey. Not a violation.
    • : Compute . Start with . Apply : add . Now . No more FDs apply. . So is not a superkey. Violation.
    • : is a candidate key, so is a superkey. Not a violation.
    • : Compute . Start with . Apply : add . Now . No more FDs apply. . So is not a superkey. Violation.

    Step 3: Count violations: and . Total = 2.

    Answer: A (2).

    Question 4 · Database Management and Warehousing MCQ

    Consider the following statements regarding attribute closure :

    1. If , then is a super key.
    2. If , then is definitely a candidate key.
    3. contains only attributes that are functionally determined by .

    Which of the statements are true?

    1. A.

      1 only

    2. B.

      1 and 3 only

    3. C.

      2 and 3 only

    4. D.

      1, 2 and 3

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a statement evaluation question testing the precise definitions of closure, super keys, and candidate keys.

    Step 1: Evaluate Statement 1. By definition, if the closure of contains all attributes of the relation , then uniquely identifies all tuples. This is the exact definition of a super key. (True)

    Step 2: Evaluate Statement 2. A candidate key must be a MINIMAL super key. does not guarantee minimality. could contain redundant attributes. (False)

    Step 3: Evaluate Statement 3. The closure is defined as the set of all attributes functionally determined by . (True)

    Step 4: Combine the results. Statements 1 and 3 are true.

    Answer: 1 and 3 only

    Question 5 · Database Management and Warehousing MCQ

    According to the L-R-LR-N classification method for finding candidate keys, which of the following scenarios is impossible?

    1. A.

      An attribute that appears on both the left and right sides is the only attribute in a candidate key.

    2. B.

      An attribute that appears only on the left side of all functional dependencies is present in every candidate key.

    3. C.

      An attribute that appears in neither the left nor right side of any functional dependency is present in every candidate key.

    4. D.

      An attribute that appears only on the right side of all functional dependencies is part of a candidate key.

    Correct Answer:

    D

    Step-by-Step Solution

    Key idea: The L-R-LR-N classification gives strict rules about which attributes can be in candidate keys.

    Step 1: Recall the rules:

    • N attributes (appear in neither L nor R): Must be in every candidate key.
    • L attributes (appear only on L): Must be in every candidate key.
    • R attributes (appear only on R): Never in any candidate key.
    • LR attributes (appear on both L and R): May be in a candidate key (needs testing).

    Step 2: Evaluate each option:

    • Option A: An LR attribute is the only attribute in a candidate key. This is possible if the closure of that single attribute is the entire relation.
    • Option B: An L attribute is in every candidate key. This is exactly the rule for L attributes. So this is possible.
    • Option C: An N attribute is in every candidate key. This is exactly the rule for N attributes. So this is possible.
    • Option D: An R attribute is part of a candidate key. This violates the rule that R attributes are never in any key. So this is impossible.

    Step 3: The impossible scenario is Option D.

    Answer: D

    Question 6 · Database Management and Warehousing MCQ

    According to the L-R-LR-N classification method for finding candidate keys, which of the following outcomes is impossible?

    1. A.

      The closure of the set of all L and N attributes is the entire relation, and there are no other candidate keys.

    2. B.

      An attribute that appears on both the left and right sides of the functional dependencies is not part of any candidate key.

    3. C.

      The closure of the set of all L and N attributes is not the entire relation, but a candidate key can be formed without using any LR attributes.

    4. D.

      An attribute that appears in neither the left nor right side of any functional dependency is part of every candidate key.

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: The L-R-LR-N classification gives strict rules about which attributes can be in candidate keys. N and L attributes must be in every key. R attributes are never in any key. LR attributes are used to complete the key if needed.

    Step 1: Evaluate Option A.

    If , then is a candidate key. Since N and L must be in every key, no other key can exist without them. If another key existed, it would have to contain , making it a super key but not a candidate key (since it wouldn't be minimal). So this is possible.

    Step 2: Evaluate Option B.

    An LR attribute appears on both sides. If , then is the only candidate key. The LR attributes are not needed and are not part of any candidate key. So this is possible.

    Step 3: Evaluate Option C.

    If , then is not a super key. To form a candidate key, we must add attributes to . Since R attributes can never be in a key, we must add LR attributes. It is impossible to form a candidate key without using any LR attributes in this case. So this is impossible.

    Step 4: Evaluate Option D.

    N attributes appear in neither side. They must be in every candidate key. So this is possible.

    Answer: C

    Question 7 · Database Management and Warehousing MCQ

    A relation schema has exactly 6 attributes. It is known that has exactly one candidate key, and this key consists of exactly 2 attributes. What is the maximum possible number of superkeys for ?

    1. A.

      8

    2. B.

      16

    3. C.

      32

    4. D.

      64

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a direct formula question on superkey enumeration. When a relation has a single candidate key of size in an -attribute schema, the number of superkeys is exactly .

    Step 1: Identify and . Here, (total attributes) and (attributes in the single candidate key).

    Step 2: Apply the formula. The 2 key attributes must be present in every superkey. The remaining attributes can be independently included or excluded.

    Step 3: Calculate .

    Answer: B (16).

    Question 8 · Database Management and Warehousing MCQ

    The FD and Key Cheat Sheet states that attributes appearing only on the right side of functional dependencies are never in any candidate key. Consider a relation with . A student argues that since is at the end of the dependency chain and is "important", the set could be a candidate key. Is this argument valid, and what is the actual minimum key size?

    1. A.

      Valid, the minimum size is 2

    2. B.

      Invalid, because E is right-only and cannot be in any key; the actual minimum size is 2

    3. C.

      Invalid, because A alone is a key; the minimum size is 1

    4. D.

      Valid, because {A, E} closes to R; the minimum size is 2

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a contradiction question that tests the cheat sheet rule for right-only attributes. The student's claim contradicts the fundamental rule that right-only attributes are never part of any candidate key.

    Step 1: Classify the attributes in .

    • : left of only → left-only (L).
    • : left of only → left-only (L).
    • : right of , left of → both-side (LR).
    • : right of , left of → both-side (LR).
    • : right of only → right-only (R).

    Step 2: Apply the cheat sheet rule. Since appears only on the right side, it can never be part of any candidate key. The student's inclusion of in violates this constraint.

    Step 3: Find the actual minimum key size. The mandatory attributes are and (both left-only). Compute :

    • Start with .
    • Apply : add . Now .
    • Apply : add . Now .
    • Apply : add . Now .

    Step 4: Since closes to and is minimal (neither nor alone closes to ), it is a candidate key of size 2.

    Answer: B.

    Question 9 · Database Management and Warehousing MCQ

    In the attribute closure algorithm for computing , we repeatedly scan the set of functional dependencies and add attributes to our result set. The algorithm terminates when a specific condition is met.

    Which of the following correctly states the termination condition?

    1. A.

      When all functional dependencies have been applied at least once

    2. B.

      When the result set contains all attributes of the relation

    3. C.

      When a complete pass through all dependencies adds zero new attributes

    4. D.

      When the result set size equals the number of functional dependencies

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: This is a direct recall question about the termination condition of the closure algorithm.

    Step 1: Recall the closure algorithm. We start with result = , then repeatedly scan all dependencies. For each dependency , if , we add to result.

    Step 2: The key question is: when do we stop? The algorithm stops when we can't add anything new. But we need to be precise about what "can't add anything new" means.

    Step 3: Evaluate each option.

    • Option A: "When all dependencies have been applied at least once" — this is wrong because we might apply a dependency, then later find that another dependency now applies (because we added new attributes). We need to keep scanning until a full pass adds nothing.
    • Option B: "When result contains all attributes" — this is a possible outcome (if is a super key), but not the termination condition. The algorithm terminates when no more attributes can be added, regardless of whether we've reached all attributes.
    • Option C: "When a complete pass adds zero new attributes" — this is correct. We scan all dependencies, and if none of them add anything new, we're done. This is the fixed-point condition.
    • Option D: "When result size equals number of dependencies" — this is nonsensical. The result size has no direct relationship to the number of dependencies.

    Step 4: Verify with an example. Suppose and we're computing .

    • Pass 1: Start with . Apply , get . Apply , get .
    • Pass 2: Scan all dependencies. : already in result. : already in result. No new attributes added. Terminate.

    This matches option C.

    Answer: C

    Question 10 · Database Management and Warehousing NAT

    Consider a relation schema with the functional dependency . The only candidate key is .

    How many super keys of contain the attribute ?

    Correct Answer:

    2.00

    Step-by-Step Solution

    Key idea: Every super key must contain at least one candidate key. Count super keys that include the candidate key and attribute C.

    Step 1: Identify the candidate key

    • Given: The only candidate key is
    • Every super key must contain

    Step 2: Enumerate all super keys

    • A super key is any superset of a candidate key
    • Possible super keys: ,
    • Total super keys = 2

    Step 3: Check which contain C

    • contains C ✓
    • contains C ✓
    • Both super keys contain C

    Step 4: Count

    • Number of super keys containing C = 2

    Answer: 2.00

    More notes in this unit