5.7.25

Third normal form

Third Normal Form (3NF)

Definition

A table is in Third Normal Form (3NF) if it is in 2NF and there are no transitive dependencies.

Rules

  • 2NF: The table must be in 2NF.
  • No Transitive Dependencies: If a table is in 2NF, and a non-key attribute depends on another non-key attribute, then it should be moved to a separate table.

Benefits

  • Eliminates Transitive Dependencies: 3NF eliminates transitive dependencies, reducing data redundancy.
  • Improves Data Integrity: 3NF ensures that non-key attributes are dependent on the primary key.
  • Simplifies Data Maintenance: 3NF makes data maintenance easier by reducing data redundancy.

Example

Consider a table that stores customer information:

Customer ID Name Salesperson ID Salesperson Name
1 John Doe 101 Jane Smith

In this example, Salesperson Name depends on Salesperson ID, which is a transitive dependency. To convert this table to 3NF, we would create separate tables for customers and salespeople:

Customer ID Name Salesperson ID
1 John Doe 101
Salesperson ID Salesperson Name
101 Jane Smith

No comments:

Post a Comment

Difference between File and Folder

10 Differences Between Files and Folders Definition: File: A collection of data or information stored on a computer. ...