[1][2] In simple words, if the values for the X attributes are known (say they are x), then the values for the Y attributes corresponding to x can be determined by looking them up in any tuple of R containing x. Customarily X is called the determinant set and Y the dependent set.
A simple application of functional dependencies is Heath's theorem; it says that a relation R over an attribute set U and satisfying a functional dependency X → Y can be safely split in two relations having the lossless-join decomposition property, namely into
(Unions of attribute sets are customarily denoted by their juxtapositions in database theory.)
The notion of logical implication for functional dependencies admits a sound and complete finite axiomatization, known as Armstrong's axioms.
Suppose one is designing a system to track vehicles and the capacity of their engines.
One would write VIN → EngineCapacity because it would be inappropriate for a vehicle's engine to have more than one capacity.
On the other hand, EngineCapacity → VIN is incorrect because there could be many vehicles with the same engine capacity.
This functional dependency may suggest that the attribute EngineCapacity be placed in a relation with candidate key VIN.
For example, if that functional dependency occurs as a result of the transitive functional dependencies VIN → VehicleModel and VehicleModel → EngineCapacity then that would not result in a normalized relation.
The situation modelled is that of college students visiting one or more lectures in each of which they are assigned a teaching assistant (TA).
Let's further assume that every student is in some semester and is identified by a unique integer ID.
We notice that whenever two rows in this table feature the same StudentID, they also necessarily have the same Semester values.
This basic fact can be expressed by a functional dependency: If a row was added where the student had a different value of semester, then the functional dependency FD would no longer exist.
Other nontrivial functional dependencies can be identified, for example: The latter expresses the fact that the set {StudentID, Lecture} is a superkey of the relation.
This case represents an example where multiple functional dependencies are embedded in a single representation of data.
Given that X, Y, and Z are sets of attributes in a relation R, one can derive several properties of functional dependencies.
This axiomatization is sometimes described as finite because the number of inference rules is finite,[5] with the caveat that the axiom and rules of inference are all schemata, meaning that the X, Y and Z range over all ground terms (attribute sets).
[4] By applying augmentation and transitivity, one can derive two additional rules: One can also derive the union and decomposition rules from Armstrong's axioms:[3][7] The closure of a set of values is the set of attributes that can be determined using its functional dependencies for a given relationship.
One uses Armstrong's axioms to provide a proof - i.e. reflexivity, augmentation, transitivity.
In other words, equivalent sets of functional dependencies are called covers of each other.
) ensuring that when the two parts are joined back no data is lost, i.e. a functional dependency provides a simple way to construct a lossless join decomposition of R in two smaller relations.
This fact is sometimes called Heaths theorem; it is one of the early results in database theory.
[9] Heath's theorem effectively says we can pull out the values of Y from the big relation R and store them into one,
, which has no value repetitions in the row for X and is effectively a lookup table for Y keyed by X and consequently has only one place to update the Y corresponding to each X unlike the "big" relation R where there are potentially many copies of each X, each one with its copy of Y which need to be kept synchronized on updates.
Heath's decomposition leaves only X to act as a foreign key in the remainder of the big table
Enforcing referential constraints after relation schema decomposition (normalization) requires a new formalism, i.e. inclusion dependencies.
In the decomposition resulting from Heath's theorem, there is nothing preventing the insertion of tuples in
Generally, the third normal form is considered to be a "good" standard for a relational database.
[citation needed] Normalization aims to free the database from update, insertion and deletion anomalies.
Finding such a set S of functional dependencies which is equivalent to some input set S' provided as input is called finding a minimal cover of S': this problem can be solved in polynomial time.