Back to course

Normalization Principle and Functional Dependency

Database Fundamentals: From Zero to Hero

Lesson 33: Normalization Principle and Functional Dependency

Normalization is a process used to organize the columns and tables of a relational database to minimize data redundancy and improve data integrity.

The Goal of Normalization

To break down large, poorly structured tables into smaller, well-structured tables linked by Foreign Keys, achieving specific Normal Forms (1NF, 2NF, 3NF, etc.).

Key Concept: Functional Dependency

A Functional Dependency is the foundation of normalization. It describes the relationship between attributes.

Definition: Attribute B is functionally dependent on Attribute A if, for every valid instance, the value of A uniquely determines the value of B. (Notation: A -> B)

Example:

In an Employees table:

  • EmployeeID -> Name (If you know the ID, you know the name.)
  • ISBN -> BookTitle (If you know the ISBN, you know the title.)
  • ZipCode may functionally determine City, but not vice versa (multiple cities can share a zip code, depending on the system).

Normal Forms

Normalization is achieved by satisfying a hierarchy of rules known as Normal Forms (NFs). We focus on the first three, as 3NF is sufficient for most business applications.

  • 1NF (First Normal Form): Eliminate repeating groups.
  • 2NF (Second Normal Form): Eliminate partial dependencies.
  • 3NF (Third Normal Form): Eliminate transitive dependencies.

We start the deep dive into 1NF in the next lesson.