bg_image
header

Third Normal Form - 3NF

The Third Normal Form (3NF) is a stage in database normalization aimed at minimizing redundancies and ensuring data integrity. A relation (table) is in Third Normal Form if it satisfies the following conditions:

  1. The relation is in Second Normal Form (2NF):

    • This means the relation is in First Normal Form (1NF) (all attribute values are atomic, no repeating groups).
    • All non-key attributes are fully functionally dependent on the entire primary key, not just part of it.
  2. No transitive dependencies:

    • No non-key attribute depends transitively on a candidate key. This means a non-key attribute should not depend on another non-key attribute.

In detail, for a relation R to be in 3NF, for every non-key attribute A and every candidate key K in R, the following condition must be met:

Example:

Suppose we have a Students table with the following attributes:

  • Student_ID (Primary Key)
  • Name
  • Course_ID
  • Course_Name
  • Instructor

In this table, the attributes Course_Name and Instructor might depend on Course_ID, not directly on Student_ID. This is an example of a transitive dependency because:

  • Student_IDCourse_ID
  • Course_IDCourse_Name, Instructor

To convert this table to 3NF, we eliminate transitive dependencies by splitting the table. We could create two tables:

  1. Students:

    • Student_ID (Primary Key)
    • Name
    • Course_ID
  2. Courses:

    • Course_ID (Primary Key)
    • Course_Name
    • Instructor

Now, both tables are in 3NF because each non-key attribute depends directly on the primary key and there are no transitive dependencies.

By achieving Third Normal Form, data consistency is increased, and redundancies are reduced, which improves the efficiency of database operations.

 


Created 4 Months ago
Database Dritte Normalform - 3NF Erste Normalform - 1NF Normal Forms Primary Key Relational Database Management System - RDBMS Relational Database Zweite Normalform - 2NF

Leave a Comment Cancel Reply
* Required Field