Functional Dependencies

Describes a relationship between attributes in a relation. Defines if one set of attributes can determine another.

If attribute set XX determines attribute set YY, it’s denoted as X→YX → Y. Which means, for any two tuples in a relation, if their XX values are the same, their YY values must also be the same.

Here:

  • X is called the determinant
  • Y is called the dependent

A functional dependency represents a constraint on valid data. All candidate keys of a relation are determinants (they functionally determine every attribute).

Usage

Functional dependencies are basis of normalization. Helps find redundancy, anomalies.

Functional dependencies help identify candidate keys and are essential for designing robust relational schemas.

Trivial

A functional dependency is trivial if it is satisfied by all instances of a relation. Of the form A→BA \rightarrow B where B⊆AB \subseteq A.

For a relation: An instance of a relation that satisfies all real-world constraints.

If a relation rr is legal under set of functional dependencies FF, it’s mentioned as rr satisfies FF.

For a database: an instance of a database in which all the relations are legel.

If a set of functional dependencies FF is legal under a relation schema RR, it’s mentioned as FF holds on RR.

Armstrong’s Axioms

  • Reflexivity
    If β⊆α\beta \subseteq \alpha then α→β\alpha \rightarrow \beta
  • Augmentation
    If α→β\alpha \rightarrow \beta then γα→γβ\gamma\alpha \rightarrow \gamma\beta
  • Transitivity
    If α→β\alpha \rightarrow \beta and β→γ\beta \rightarrow \gamma and α→γ\alpha \rightarrow \gamma

The above rules are:

  • Sound
    Generate functional dependencies that hold.
  • Complete
    Generate all functional dependencies that hold.

Other inferred rules:

  • Union
    If α→β\alpha \rightarrow \beta and α→γ\alpha \rightarrow \gamma then α→βγ\alpha \rightarrow \beta\gamma
  • Decomposition
    If α→βγ\alpha \rightarrow \beta\gamma then α→γ\alpha \rightarrow \gamma and α→β\alpha \rightarrow \beta
  • Pseudotransitivity
    If α→β\alpha \rightarrow \beta and γβ→δ\gamma\beta \rightarrow \delta then αγ→δ\alpha\gamma \rightarrow \delta

Closure

Suppose FF is a set of functional dependencies.

Closure of FF, denoted as F+F^+, is the complete set of all functional dependencies that can be logically inferred from FF. Armstrong’s axioms are repeatedly applied to compute F+F^+.

F+F^+ can be computed by:

Step-by-Step Procedure

  1. Initialize F+F^+ = F
  2. For each functional dependency of F+F^+, apply Armstrong’s axioms:
  • Reflexivity
  • Augmentation
  • Transitivity
  1. Add each new functional dependency to F+F^+.
  2. Continue applying rules until no new dependencies appear

Takes exponential time to compute.

Canonical Cover

For a set of functional dependencies FF, its canonical cover is the minimal set of functional dependencies equivalent to FF, having no redundant dependencies or redundant parts of dependencies.

Multivalued Dependencies

A multivalued dependency (MVD) α↠β\alpha \twoheadrightarrow \beta holds on a relation RR iff for any 2 tuples t1t_1 and t2t_2 with t1[α]=t2[α]t_1[\alpha] = t_2[\alpha], the relation also has tuples t3t_3 and t4t_4 such that:

  • t3[α]=t4[α]=t1[α]t_3[\alpha] = t_4[\alpha] = t_1[\alpha]
  • t3[β]=t1[β]t_3[\beta] = t_1[\beta] and t3[R−α−β]=t2[R−α−β]t_3[R - \alpha - \beta] = t_2[R - \alpha - \beta]
  • t4[β]=t2[β]t_4[\beta] = t_2[\beta] and t4[R−α−β]=t1[R−α−β]t_4[R - \alpha - \beta] = t_1[R - \alpha - \beta]

The β\beta values of an α\alpha value are independent of the remaining attributes. Every combination of them appears in the relation.

An MVD is trivial if β⊆α\beta \subseteq \alpha or α∪β=R\alpha \cup \beta = R.

Every functional dependency is also a multivalued dependency.

Example:
In R(Employee,Skill,Language)R(\text{Employee}, \text{Skill}, \text{Language}), Employee↠Skill\text{Employee} \twoheadrightarrow \text{Skill} and Employee↠Language\text{Employee} \twoheadrightarrow \text{Language} hold. If Ann has the skills SQL and Java and the languages EN and FR, all 4 combinations of skill and language appear in RR.

Written by October 10, 2026 3 min read
Was this helpful?