← All topics

Learn free · topic 45

3NF – Third Normal Form

Third Normal Form (3NF) removes transitive dependencies. A table is in 3NF if it is already in Second Normal Form and every non-key attribute depends only on the primary key, not on another non-key attribute. In other words, there must be no indirect dependency chains inside the table.

A transitive dependency occurs when a non-key attribute depends on another non-key attribute rather than directly on the primary key. This creates hidden redundancy and potential inconsistency. The dependency pattern can be expressed as A → B → C, where A is the primary key, B is a non-key attribute, and C depends on B instead of directly on A.

Returning to the loan approval example, suppose the Loan table contains the following attributes: LoanID (primary key), CustID, CustomerName, and CustomerAddress. While LoanID determines CustID, the attributes CustomerName and CustomerAddress actually depend on CustID, not directly on LoanID. This means there is a transitive dependency: LoanID → CustID → CustomerName. The customer details are not properties of the loan itself; they are properties of the customer.

Third Normal Form resolves this by separating the dependent attributes into their own table. CustomerName and CustomerAddress should move to a Customer table, keyed by CustID. The Loan table should retain only attributes that depend directly on LoanID. The result is two cleanly defined entities: Customer and Loan, each storing attributes appropriate to its own key.

This restructuring eliminates redundancy. If a customer’s address changes, it is updated in exactly one place. The model becomes logically clearer because each table represents a single subject, and every attribute depends directly and only on that table’s primary key.

The rule for achieving 3NF is straightforward. Begin with a 2NF table. Examine all non-key attributes carefully. If any attribute depends on another non-key attribute rather than directly on the primary key, move it into a new table where it properly depends on its own key. Establish a foreign key relationship to maintain the connection.

Third Normal Form is often sufficient for most transactional systems. At this level, partial dependencies and transitive dependencies have been eliminated. The structure is clean, consistent, and free of most common anomalies.

However, certain edge cases remain where 3NF may still allow subtle integrity problems. These are addressed in Boyce–Codd Normal Form (BCNF), which strengthens the dependency rules further.

With 3NF achieved, the data model now represents a disciplined relational structure. Each table stores facts about one thing, and every attribute depends only on the key of that table, nothing else.

A screenshot of a computer

AI-generated content may be incorrect.

A screenshot of a loan application

AI-generated content may be incorrect.

Finished reading? Test yourself with 10 questions on this topic.

Go to the questions →

From I Am Datapedia! by Mustafa Qizilbash, published here free by the author. Nothing about your reading is stored.