DATABASE MANAGEMENT SYSTEMS/Student Engineering Notebook
Page 05·notes
FUNCTIONAL DEPENDENCIES & NORMALIZATION (1NF TO BCNF)—~28 MIN READ

Functional Dependencies, Candidate Keys & Normal Forms (1NF to BCNF)

“Armstrong axioms, attribute closures, 1NF to BCNF testing, and lossless decomposition.”

1.The Quest for Redundancy-Free Schema Design

Poorly designed database schemas suffer from three catastrophic anomalies: Insertion Anomaly (cannot record a department without hiring an employee), Deletion Anomaly (deleting the last student in a course erases the course record), and Update Anomaly (changing an address requires updating 10,000 duplicate rows).

Normalization is the formal mathematical decomposition of relations to eliminate redundant storage without losing information. It relies on Functional Dependencies (FDs): constraints asserting that knowing the value of attribute set X uniquely determines the value of attribute set Y (X → Y).

2.Armstrong's Axioms & Attribute Closure

Armstrong's 3 Primary Axioms (Sound and Complete):

1. Reflexivity: If Y ⊆ X, then X → Y (e.g., AB → A).

2. Augmentation: If X → Y, then XZ → YZ for any Z.

3. Transitivity: If X → Y and Y → Z, then X → Z.

Secondary Derived Rules:

• Union: If X → Y and X → Z, then X → YZ.

• Decomposition: If X → YZ, then X → Y and X → Z.

• Pseudotransitivity: If X → Y and WY → Z, then WX → Z.

The Attribute Closure Algorithm (X+):

To find all attributes determined by set X under dependencies F, initialize Closure = X. Repeatedly add RHS of any FD whose LHS is inside Closure until Closure stops expanding. If X+ equals all attributes of R, then X is a Superkey!

LABORATORY · INTERACTIVE SIMULATION —Concept Exploration

3. Interactive Normalization & Candidate Key Engine

Experiment with relations and functional dependencies. Click attributes to compute their live attribute closure, derive all minimal candidate keys, and check 1NF, 2NF, 3NF, and BCNF compliance.

Interactive Schema Evaluator

Functional Dependency & Normal Form Evaluator

Compute attribute closures and test 1NF, 2NF, 3NF, and BCNF conditions.

Highest Normal Form:3NF
Standard GATE PYQ Presets:
Relation Schema:R(A, B, C, D)
Functional Dependencies (F):
AB → CC → DD → A

Attribute Closure Calculator (X+)

Click attributes to compute their transitive functional reach under F:

Closure (AB)+ = {A, B, C, D}
● Superkey (Determines All Attributes)

Derived Candidate Keys (3)

ABBCBD

A candidate key is a minimal superkey. Notice that no proper subset of these keys can determine all attributes.

Attribute Taxonomy

Prime Attributes (Part of any key):{A, B, C, D}
Non-Prime Attributes:{None}

Normal Form Breakdown per Dependency

FDLHS is Superkey?RHS is Prime?2NF Status3NF StatusBCNF Status
AB → CYesYesPassPassPass
C → DNoYesPassPassViolates
D → ANoYesPassPassViolates

4.The Normal Form Hierarchy: 1NF → 2NF → 3NF → BCNF

Every normal form is strictly stricter than the one before it: BCNF ⊂ 3NF ⊂ 2NF ⊂ 1NF.

1. First Normal Form (1NF): Every attribute value must be atomic (no arrays, lists, sets, or nested relations).

2. Second Normal Form (2NF): Relation is in 1NF AND no non-prime attribute is partially dependent on any candidate key. (Violation: If candidate key is AB, and A → C where C is non-prime).

3. Third Normal Form (3NF): Relation is in 2NF AND for every non-trivial FD X → Y, either X is a Superkey OR Y is a Prime Attribute. 3NF guarantees both Lossless Join AND Dependency Preservation!

4. Boyce-Codd Normal Form (BCNF): For every non-trivial FD X → Y, X must strictly be a Superkey. BCNF eliminates all FD redundancy, but some schemas cannot achieve BCNF without losing dependency preservation!

WORKED NUMERICAL · STUDENT DERIVATION✎ Key Takeaway: When multiple candidate keys exist, use the Principle of Inclusion-Exclusion: |SK(K1 ∪ K2)| = |SK(K1)| + |SK(K2)| - |SK(K1 ∩ K2)|.

5. GATE Classic: Counting Superkeys from Candidate Keys

Problem Statement:
A relation R(A, B, C, D, E) has exactly one candidate key: AB. How many total superkeys exist for relation R?
Total Attributes n5 (A, B, C, D, E)Candidate Key Size k2 (Attributes A and B)
Step 1: Understand the Definition of Superkey

A superkey is any superset of a candidate key. Therefore, every superkey must contain both attributes A and B.

Step 2: Count Freedom for Remaining Attributes

The remaining attributes {C, D, E} can either be included or excluded from the superkey. There are n - k = 5 - 2 = 3 independent choices.

Choices = 2^(n - k)
Step 3: Calculate Total Superkeys

2^(5 - 2) = 2^3 = 8 superkeys: {AB, ABC, ABD, ABE, ABCD, ABCE, ABDE, ABCDE}.

Total Superkeys = 8
Final Answer:8 total superkeys exist.
STUDENT PRACTICE · CONCEPT DRILL

6. Normalization Concept Verification

Solve high-frequency GATE normalization problems.

Problem 1 · FOUNDATION

Relation R(A, B, C, D) has FDs: {A → B, B → C, C → D}. What is the candidate key and the highest normal form of R?

RAPID REVIEW · NOTEBOOK SUMMARY

7. 1-Minute Normalization Revision Anchors

core principle:

“2NF = No Partial Dependency; 3NF = LHS Superkey OR RHS Prime; BCNF = LHS must be Superkey.”

must-remember principles:
  • •Superkey count with single key size k: 2^(n - k).
  • •Lossless condition: (R1 ∩ R2) → R1 or (R1 ∩ R2) → R2.
  • •3NF always guarantees dependency preservation; BCNF may lose dependencies.
  • •Attributes that never appear on the RHS of any FD MUST be in every candidate key.
critical exam pitfalls:
  • •A partial dependency only exists when a PROPER SUBSET of a key determines a non-prime attribute.
  • •If all candidate keys are single attributes, 2NF is automatically satisfied!
SOURCE TRANSPARENCY & CITATIONS

Primary Academic References & Exam Sources

Every concept in Notes From a B.Tech Brain is synthesized from authoritative academic texts, seminal peer-reviewed research, verified exam archives, and renowned university lectures.

Primary Academic Texts
Further Normalization of the Data Base Relational Model↗by Edgar F. Codd (Courant Computer Science Symposia, 1971) · Introduction of 2NF and 3NF

Foundational paper formalizing functional dependencies and relational decomposition.

ACADEMIC STANDARD
Database System Concepts (10th Edition)↗by Silberschatz, Korth, Sudarshan · Chapter 7: Relational Database Design

Canonical reference for minimal cover and lossless decomposition algorithms.

ACADEMIC STANDARD
RECOMMENDED YOUTUBE EDUCATORS & FULL-COURSE PLAYLISTS

Curated for clarity, rigorous numerical solving, and semester excellence:

Knowledge Gate · DBMS for GATE & Semester↗Instructor: Sanchit Jain · Covers: ER diagrams, normalization, SQL, transactions, concurrency control

GATE-focused numerical problem-solving with clear worked examples.

Open YouTube↗
Gate Smashers · DBMS Full Course↗Instructor: Varun Singla · Covers: Relational algebra, SQL queries, B/B+ trees, file organization

Fast conceptual coverage with step-by-step GATE numericals.

Open YouTube↗
Neso Academy · DBMS Complete Playlist↗Instructor: Neso Academy · Covers: Relational model, SQL, normalization theory, ACID properties

Systematic textbook-style explanations ideal for first-time learners.

Open YouTube↗
Ravindrababu Ravula · DBMS Lectures↗Instructor: Ravindrababu Ravula · Covers: Functional dependencies, BCNF, 3NF decomposition, transaction schedules

Deep theoretical rigor on normalization and transaction serializability.

Open YouTube↗