Normal Forms
Normal Forms
• 1. Wasted Storage
• 2. Data Anomalies
• Update Anomalies
• Insertion Anomalies
• Deletion Anomalies
• 3. Increased Complexity
• 4. Performance Issues
• 5. Data Integrity Issue
• Example
| OrderID | CustomerName | Product | CustomerAddress
||-------|--------------|-----------|-----------------|
|1 | Madhu | Laptop | Hyderabad |
|2 | Madhu | Mouse | Hyderabad |
|3 | Naveen | Keyboard | Bengaluru |
• Problems:
1. Update Anomaly: If Madhu moves to a new address, you'd have to update multiple rows. If
you forget to update all the rows, it leads to inconsistent data.
2. Insertion Anomaly: To insert a new order for Madhu, you have to re-enter his address,
leading to further redundancy.
3. Deletion Anomaly: If you decide to delete the order with the mouse, you might be tempted
to delete Madhu's details entirely, but that would remove crucial data associated with the
laptop order.
1. Customers Table:
| CustomerID | CustomerName | CustomerAddress
|------------|--------------|-------------------|
| 101 | Madhu | Hyderabad |
| 102 | Naveen | Bengaluru |
2. Orders Table:
| OrderID | CustomerID | Product |
|---------|------------|----------|
|1 | 101 | Laptop |
|2 | 101 | Mouse |
|3 | 102 | Keyboard |
• 1. Atomic Values
• 2. Should not have multiple values
• 3.All attributes should be unique
| Student_ID | Subjects |
|------------|-------------------|
| 1 | Math, English |
| 2 | English, Science |
| 3 | Math, History |
| Student_ID | Subject |
|------------|-----------|
| 1 | Math |
| 1 | English |
| 2 | English |
| 2 | Science |
| 3 | Math |
| 3 | History |
• Second Normal Form (2NF)
2. No Partial Dependencies:
Course Table
StudentCourse Table
• Third Normal Form (3NF)
Vendor Table
| Vendor_Name | Vendor_Address |
|---------------------|-----------------------|
| TechCorp | 123 Tech St. |
| FurniShop | 456 Furni Rd. |
• Boyce-Codd Normal Form (BCNF)
• Deals with how data evolves over time and is less commonly
discussed in most relational database design contexts.