Third normal form
Third normal form (3NF) is a level of database normalization defined by English computer scientist Edgar F. Codd. A relation (or table, in SQL) is in third normal form if it is in second normal form and also lacks non-key dependencies, meaning that no non-prime attribute is functionally dependent on (that is, contains a fact about) any other non-prime attribute. In other words, each non-prime attribute must depend solely and non-transitively on each candidate key. William Kent summarised 3NF with the dictum that "a non-key field must provide a fact about the key, the whole key, and nothing but the key". An example of a violation of 3NF would be a Patient relation with the attributes PatientID, DoctorID and DoctorName, in which DoctorName would depend first and foremost on DoctorID and only transitively on the key, PatientID (via DoctorID's dependency on PatientID). Such a design would cause a doctor's name to be redundantly duplicated across each of their patients. A database compliant with 3NF would store doctors' names in a separate Doctor relation which Patient could reference via a foreign key. 3NF was defined, along with 2NF (which forbids dependencies on proper subsets of composite keys), in Codd's paper "Further Normalization of the Data Base Relational Model" in 1971, which came after 1NF's definition in "A Relational Model of Data for Large Shared Data Banks" in 1970.…
Third normal form (3NF) is a level of database normalization defined by English computer scientist Edgar F. Codd. A relation (or table, in SQL) is in third normal form if it is in second normal form and also lacks non-key dependencies, meaning that no non-prime attribute is functionally dependent on (that is, contains a fact about) any other non-prime attribute. In other words, each non-prime attribute must depend solely and non-transitively on each candidate key. William Kent summarised 3NF with the dictum that "a non-key field must provide a fact about the key, the whole key, and nothing but the key". An example of a violation of 3NF would be a Patient relation with the attributes PatientID, DoctorID and DoctorName, in which DoctorName would depend first and foremost on DoctorID and only transitively on the key, PatientID (via DoctorID's dependency on PatientID). Such a design would cause a doctor's name to be redundantly duplicated across each of their patients. A database compliant with 3NF would store doctors' names in a separate Doctor relation which Patient could reference via a foreign key. 3NF was defined, along with 2NF (which forbids dependencies on proper subsets of composite keys), in Codd's paper "Further Normalization of the Data Base Relational Model" in 1971, which came after 1NF's definition in "A Relational Model of Data for Large Shared Data Banks" in 1970. 3NF was itself followed by the definition of Boyce–Codd normal form in 1974, which seeks to prevent anomalies possible in relations with several overlapping composite keys. ==Definition of third normal form== Codd's definition states that a relation R is in 3NF if and only if it is in second normal form (2NF) and every non-prime attribute of R is non-transitively dependent on each candidate key. A non-prime attribute of R is an attribute that does not belong to any candidate key of R. Codd defines a transitive dependency of an attribute set Z on an attribute set X as a functional dependency chain X → Y → Z that must be satisfied for some attribute set Y, where it is not the case that Y → X, and all three sets must be disjoint. A 3NF definition that is equivalent to Codd's, but expressed differently, was given by Carlo Zaniolo in 1982. This definition states that a table is in 3NF if and only if for each of its functional dependencies X → Y, at least one of the following conditions holds: X contains Y (that is, Y is a subset of X, meaning X → Y is a trivial functional dependency), X is a superkey, every element of Y \ X, the set difference between Y and X, is a prime attribute (i.e., each attribute in Y \ X is contained in some candidate key). To rephrase Zaniolo's definition more simply, the relation is in 3NF if and only if for every non-trivial functional dependency X → Y, X is a superkey or Y \ X consists of prime attributes. Zaniolo's definition gives a clear sense of the difference between 3NF and the more stringent Boyce–Codd normal form (BCNF). BCNF simply eliminates the third alternative ("Every element of Y \ X, the set difference between Y and X, is a prime attribute."). The definition offered by Zaniolo can be shown to be equivalent to the Codd definition in the following way (the trivial case is by default same statements): let X → A be a nontrivial functional dependency (i.e., one where X does not contain A) and let A be a non-prime attribute. Also let Y be a candidate key of R. Then Y → X. Further since A is a non-prime attribute, therefore A cannot determine X (A → X not possible) because in that case some AM would form the candidate key (where M = Y \ A (or simply Y, since A is non-prime and thus not an element of Y)). Therefore, A is not transitively dependent on Y (X is not prime attribute as per 2NF but both Y and X can be non-primes if we do not follow the Codd's definition for 3NF. If we follow Codd's definition Y is candidate key and we are showing that following that definition is equivalent to following Zaniolo's definition) if and only if there is a functional dependency X → Y (simply reversing one of the dependency to avoid transitivity), i.e., if and only if X is a candidate key of R in case R consists only these two dependencies otherwise X is a prime attribute, but the second case violates 2NF. So, for a dependency Y → X, X and Y are candidate keys or at least Y is a candidate key, then the relation is in 3NF as per Codd (this is the 2. condition of Zaniolo's definition). The only other way to follow the definition of Codd for 3NF is not to consider any non-prime being dependent, that is to make every such A only a prime attribute i.e. there shouldn't be a non-prime attribute that depends on another non-prime attribute (2NF allows dependency on candidate key or non-prime attribute) that may lead to transitivity (in short avoid non-prime to non-prime dependency). By allowing such dependencies where right hand side is only primes we follow Codd's third normal form as well as third condition of Zaniolo's definition. It is to be noted that either or each of A, X and Y can be single attributes or a combination thereof but are necessarily disjoint. One can write X → Y equivalently as X → XY and one may thus observe the Zaniolo equivalence for Codd by performing the set difference between the dependent and the determinant. In short, Zaniolo points to a loophole more clearly than the transitive definition. 3NF gives a massive "escape clause" (loophole) to the RHS. One interesting point here is before 3NF we were bothered about LHS and even in BCNF we are bothered about that. For a dependency (X → Y) to pass 3NF, even if X is not a Super Key / Candidate Key the following conditions must be true: Y is a Prime Attribute (RHS loophole) =="Nothing but the key"== A paraphrase of Codd's definition of 3NF parodying the traditional oath to tell the truth in a court of law was given by William Kent: "a non-key field must provide a fact about the key, the whole key, and nothing but the key". Requiring that non-key attributes be dependent on "the whole key" ensures compliance with 2NF, and further requiring their dependency on "nothing but the key" ensures compliance with 3NF. A common variation supplements the paraphrase with the addendum "so help me Codd". While the phrase is a useful mnemonic, the mention of only a single key makes fulfilling it necessary but not sufficient to satisfy 2NF and 3NF, both of which are concerned with all candidate keys of a relation and not just any one. Christopher J. Date notes that, adapted to refer to all fields rather than just non-key fields, the summary can also encompass the slightly stronger Boyce–Codd normal form, in which prime attributes must not be functionally dependent at all. Prime attributes are considered to provide a fact about the key in the sense of providing part or all of the key itself. (This rule applies only to functionally dependent attributes, as applying it to all attributes would implicitly prohibit composite keys, since each part of any such key would violate the "whole key" clause.) ==Considerations for use in reporting environments== While 3NF was ideal for machine processing, the segmented nature of the data model can be difficult to intuitively consume by a human user. Analytics via query, reporting, and dashboards were often facilitated by a different type of data model that provided pre-calculated analysis such as trend lines, period-to-date calculations (month-to-date, quarter-to-date, year-to-date), cumulative calculations, basic statistics (average, standard deviation, moving averages) and previous period comparisons (year ago, month ago, week ago) e.g. dimensional modeling and beyond dimensional modeling, flattening of stars via Hadoop and data science. Hadley Wickham's "tidy data" framework is 3NF, with "the constraints framed in statistical language". ==See also== Attribute-value system First normal form (1NF) Second normal form (2NF) Boyce–Codd normal form (BCNF or 3.5NF) Fourth normal form (4NF) Fifth normal form (5NF) Sixth normal form (6NF) ==References== ==Further reading== Date, C. J. (1999), * ==External links== Litt's Tips: Normalization Database Normalization Basics by Mike Chapple (About.com) An Introduction to Database Normalization by Mike Hillyer. A tutorial on the first 3 normal forms by Fred Coulson Description of the database normalization basics by Microsoft Third Normal Form with Simple Examples by exploreDatabase de:Normalisierung (Datenbank)#Dritte Normalform (3NF)
References
No reference rows published for this article.
Cite this article
MLA
"Third normal form." encyclopegia.org, 2026, https://encyclopegia.org/wiki/third-normal-form. Accessed 24 November 2026.
Chicago
"Third normal form." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/third-normal-form.
APA
encyclopegia.org. (2026). Third normal form. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/third-normal-form
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON