Normalization
Normalization
Normalization
Functional dependencies,
"In a university database, we need to store details of students and their respective departments.
Considering the concepts of database normalization and redundancy, how should we design the
schema to ensure efficient storage and data integrity?
❌ Problems:
✅ Advantages:
1. Insertion Anomaly
2. Deletion Anomaly
3. Update Anomaly
Anomalies in Bad Database Schema
Insertion Anomaly
3. Update Anomaly
False
False
True
More practice questions: Self Practices
click here for document
Normalization
Normalization:
The process of decomposing unsatisfactory "bad" relations
by breaking up their attributes into smaller relations
Normal form:
Condition using keys and FDs of a relation to certify
whether a relation schema is in a particular normal form
First Normal Form
Disallows
1. composite attributes
2. multivalued attributes
3. nested relations; attributes whose values for an
individual tuple are non-atomic
Normalization into 1NF
For this relation in table 4, STUD_NO -> STUD_STATE and STUD_STATE -> STUD_COUNTRY are
true. So STUD_COUNTRY is transitively dependent on STUD_NO.
CD -> E,
B -> D,
E -> A
Questions:
- Is the relation in 3NF?
- Is any refinement needed?
To calculate 3NF
Note: There exist relations that are in 3NF but not in BCNF
Simple Example
Stu_ID −> Stu_Branch
Stu_Course −> {Branch_Number, Stu_Course_No}