Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Third normal form (3NF) is a condition for a relational schema: for every nontrivial functional dependency X→A, either X is a superkey or A is a prime attribute—one that appears in at least one candidate key. This formal test is more complete than the shorthand “no transitive dependencies,” especially when candidate keys overlap.

What the terms in the 3NF definition mean

  • Functional dependency: X→A means that any two valid rows that agree on attributes in X must also agree on A. It expresses a rule about valid data, not merely a pattern observed in a few existing rows.
  • Superkey: a set of attributes that functionally determines every attribute in the relation.
  • Candidate key: a minimal superkey; removing any attribute from it means it no longer determines every attribute.
  • Prime attribute: an attribute included in at least one candidate key. An attribute included in none is nonprime.

A dependency is nontrivial when its right-hand attribute is not already included in its left-hand set. For a dependency with several attributes on the right, assess each attribute separately.

How to check whether a relation is in 3NF

  1. Write down the relation’s meaningful functional dependencies from the application’s rules. Do not infer them solely from a sample of current rows.
  2. Find all candidate keys. The primary key alone is not enough if other candidate keys exist.
  3. For each nontrivial dependency X→A, check whether X determines every attribute in the relation. If it does, X is a superkey and the dependency passes.
  4. If X is not a superkey, check whether A is prime. The dependency passes only if it is.
  5. The relation is in 3NF only when every nontrivial dependency passes. Apply the check to every attribute in a multi-attribute right-hand side.

Example: a transitive dependency that violates 3NF

Consider R(A,B,C) with A→B and B→C, where A is a key and C is nonprime. Because A determines C through B, this is a familiar transitive-dependency case. But the formal test pinpoints the violation: for B→C, B is not a superkey and C is not prime, so the relation is not in 3NF. The University of Wollongong uses this dependency pattern in its explanation of a 3NF violation.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why “no transitive dependencies” is not the full test

The shorthand is useful for common cases where a non-key attribute depends transitively on a key. It does not capture the formal allowance for a non-superkey determinant when the dependent attribute is prime. That allowance matters when candidate keys overlap.

For example, in LOCATION(city, street, zipcode), suppose (city, street)→zipcode and zipcode→city. The candidate keys are (city, street) and (zipcode, street), which makes city prime. The dependency zipcode→city passes the 3NF test because its right-hand attribute is prime, even though zipcode alone is not a superkey. It violates BCNF, which does not allow this exception.

How 3NF compares with BCNF

Boyce–Codd normal form (BCNF) is stricter than 3NF. For each nontrivial functional dependency, BCNF requires the determinant—the left-hand side—to be a superkey. 3NF also allows a dependency whose determinant is not a superkey when its right-hand attribute is prime. The zipcode→city dependency above illustrates that difference.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why designers use 3NF

Normalization organizes data according to its functional dependencies to reduce redundancy. Splitting a relation can avoid repeatedly storing the same facts, but additional relations can mean more joins and more complex queries. 3NF is often used as a practical balance: a 3NF synthesis can provide a lossless-join decomposition that preserves dependencies, while the stricter BCNF can make dependency preservation more difficult. Whether 3NF is appropriate for a particular application depends on its actual dependencies and design requirements.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.