Normalization and Functional Dependency
Normalization
✅ Definition:
Normalization is a process in database design used to eliminate data redundancy (duplicate data) and ensure data
integrity by organizing tables and relationships efficiently.
✅ Purpose:
Avoid data redundancy
Eliminate update anomalies
Ensure data consistency
Make the database more efficient
📘 Example (Unnormalized Table – UNF)
StudentID StudentName Course1 Course2
101 Raj Math Science
102 Simran English NULL
This table has repeating groups (Course1, Course2).
🔹 Normalization Forms (with examples):
🔸 1NF (First Normal Form):
Rule: Each column must have atomic values (no multiple values or arrays).
Conversion:
StudentID StudentName Course
101 Raj Math
101 Raj Science
102 Simran English
✅ Now, each field contains only atomic (indivisible) values.
🔸 2NF (Second Normal Form):
Rule:
Must be in 1NF
1/4
No partial dependency (non-key attribute depends on part of a composite key)
Assume Primary Key: (StudentID, Course)
Now suppose we have:
StudentID StudentName Course
101 Raj Math
101 Raj Science
Here, StudentName depends only on StudentID, not on (StudentID, Course).
🔁 So, split into two tables:
1. Student Table:
StudentID StudentName
101 Raj
102 Simran
2. Enrollment Table:
StudentID Course
101 Math
101 Science
102 English
✅ This removes partial dependency.
🔸 3NF (Third Normal Form):
Rule:
Must be in 2NF
No transitive dependency (non-key attribute depends on another non-key attribute)
Example:
StudentID StudentName DeptID DeptName
101 Raj D1 CS
102 Simran D2 English
Here:
StudentID → DeptID
DeptID → DeptName
So, DeptName is transitively dependent on StudentID.
2/4
🔁 Split into:
1. Student Table:
StudentID StudentName DeptID
101 Raj D1
102 Simran D2
2. Department Table:
DeptID DeptName
D1 CS
D2 English
✅ Now, transitive dependency is removed.
Functional Dependency (FD)
✅ Definition:
A Functional Dependency is a relationship between two attributes, typically between a key and non-key attribute.
A → B means: if two rows have the same value of A, they must also have the same value of B.
✅ Notation:
A → B: B is functionally dependent on A
A is the determinant
📘 Example:
RollNo Name Course Fees
101 Raj BCA 25000
102 Simran MCA 40000
Assume:
RollNo → Name, Course, Fees
(Each student has a unique RollNo)
So:
RollNo → Name
RollNo → Course
3/4
RollNo → Fees
These are functional dependencies.
✅ Types of Functional Dependencies:
Type Description Example
Trivial FD A → B where B ⊆ A {RollNo, Name} → RollNo
Non-trivial FD A → B where B ⊈ A RollNo → Name
Full FD If A → B, and no subset of A determines B {RollNo, Course} → Fees
Partial FD A → B, but a subset of A also determines B {RollNo, Name} → Name
Transitive FD A → B and B → C implies A → C RollNo → DeptID, DeptID → DeptName
Multivalued FD A →→ B: For each A, there are multiple B StudentID →→ Course
4/4