What are Armstrong's axioms for functional dependencies, and how do you use them to reduce a declared dependency set to a minimal (canonical) cover?
answer
- Reflexivity, augmentation, transitivity
- Sound = never wrong; complete = misses nothing
- Right sides split, left sides do not
- Minimal cover: singleton RHS, no extraneous LHS attribute, no redundant FD
- Cover is not unique
basics
~20 sArmstrong's axioms are reflexivity, augmentation and transitivity; they are sound and complete, so everything implied can be derived from them. A minimal cover is an equivalent dependency set with single-attribute right sides, no extraneous left-side attributes and no redundant dependencies.
solid answer
~60 s**Armstrong's axioms** (sound and complete inference rules for FDs): - *Reflexivity*: if Y is a subset of X then `X -> Y`. - *Augmentation*: if `X -> Y` then `XZ -> YZ`. - *Transitivity*: if `X -> Y` and `Y -> Z` then `X -> Z`. Derived conveniences: union (`X -> Y`, `X -> Z` give `X -> YZ`), decomposition (the reverse), and pseudotransitivity (`X -> Y`, `WY -> Z` give `WX -> Z`). Completeness means anything true in every relation satisfying F is derivable; soundness means nothing false is. **Minimal cover** of F is a set G, equivalent to F, where: 1. every right side is a single attribute; 2. no attribute can be dropped from any left side without changing the implied set; 3. no whole dependency can be removed without changing the implied set. Procedure: split right sides, then remove extraneous left-side attributes using closure tests, then delete redundant dependencies one at a time, rechecking against the *current* set after each removal. The result is not unique - different removal orders yield different but equivalent covers.
code
text · 4 lines1 split RHS : A->B, A->C, B->C, AB->C
2 extraneous: A+ = ABC contains C => AB->C becomes A->C (duplicate)
3 redundant : drop A->C; A+ under {A->B, B->C} = ABC, still has C => drop it
result : { A->B, B->C }go deeper
State the three axioms and give the union and decomposition shortcuts with a one-line justification each.
Run the minimal-cover procedure on a small set correctly, including recomputing closures against the current set.
Explain soundness and completeness, why left sides cannot be split, and how the cover feeds dependency-preserving decomposition.
Treat the cover as the canonical statement of business rules a schema encodes and discuss reviewing it with domain owners, including the ambiguity introduced by non-uniqueness.
## Why inference rules matter A design starts from a set F of dependencies someone wrote down. The dependencies that actually constrain the data are F+, the closure of F under logical implication. Armstrong's axioms are the proof system that generates F+. ## The three axioms **Reflexivity (trivial dependencies).** If Y is a subset of X then `X -> Y` holds in every relation. It needs no premise, which is why it is sometimes called an axiom scheme rather than a rule. **Augmentation.** If `X -> Y` then `XZ -> YZ` for any Z. Adding the same attributes to both sides preserves the dependency: if two rows agree on XZ they agree on X, hence on Y, and they agree on Z by assumption. **Transitivity.** If `X -> Y` and `Y -> Z` then `X -> Z`. Equal X values force equal Y values, which force equal Z values. **Soundness** means every dependency derivable by these rules genuinely holds in every relation satisfying F - the rules never lie. **Completeness** means every dependency that holds in all such relations is derivable - the rules miss nothing. Together they justify treating syntactic derivation and semantic implication as the same thing, which is what licenses the attribute-closure shortcut used in practice. ## Derived rules Three consequences save work: - **Union**: from `X -> Y` and `X -> Z`, derive `X -> YZ`. - **Decomposition**: from `X -> YZ`, derive `X -> Y` and `X -> Z`. - **Pseudotransitivity**: from `X -> Y` and `WY -> Z`, derive `WX -> Z`. Decomposition is what makes single-attribute right sides lossless as a normalisation of notation. Note the asymmetry: right sides split freely, **left sides do not**. From `XY -> Z` you may *not* conclude `X -> Z`; that is the single most common error in this material. ## Minimal cover Two dependency sets are **equivalent** when each implies the other, i.e. they have the same closure. A **minimal (canonical) cover** of F is an equivalent set G satisfying three conditions: 1. Every dependency in G has exactly one attribute on the right. 2. No dependency `X -> A` in G can have an attribute removed from X while G stays equivalent to F. Such a removable attribute is **extraneous**. 3. No dependency can be deleted from G while G stays equivalent to F. ### Procedure **Step 1 - split right sides.** Rewrite `X -> ABC` as `X -> A`, `X -> B`, `X -> C` using decomposition. **Step 2 - remove extraneous left-side attributes.** For each dependency `XY -> A` with a multi-attribute left side, test whether the smaller left side already suffices: compute `X+` under the *current* set. If A is in `X+`, then Y was extraneous and the dependency becomes `X -> A`. **Step 3 - remove redundant dependencies.** For each remaining `X -> A`, tentatively delete it and compute `X+` under the reduced set. If A is still in `X+`, the dependency was implied by the others; delete it permanently. Otherwise restore it. Steps 2 and 3 must always be evaluated against the set as it currently stands, including changes already made, or you can delete two dependencies that were each redundant only because the other was present, losing information. ### Worked example `F = { A -> BC, B -> C, A -> B, AB -> C }` over R(A, B, C). Split: `A -> B`, `A -> C`, `B -> C`, `A -> B` (duplicate, keep one), `AB -> C`. Extraneous left sides: in `AB -> C`, check `A+ = {A, B, C}` - it contains C, so B is extraneous and the dependency reduces to `A -> C`, which duplicates one we already have. Redundancy: remove `A -> C` and compute `A+` from `{A -> B, B -> C}` - it is `{A, B, C}`, still containing C, so `A -> C` is redundant. Remove it. Minimal cover: `{ A -> B, B -> C }`. ### Non-uniqueness A given F can have several minimal covers depending on processing order. With `F = { A -> B, B -> A, A -> C, B -> C }` you can keep `A -> C` or `B -> C` but not both; either choice yields a valid minimal cover. So "the" minimal cover is a misnomer - claiming uniqueness is a red flag. ## Where it is used Minimal covers are the input to dependency-preserving decomposition: the synthesis approach builds one relation per dependency group in the cover, so a bloated cover produces a bloated schema with redundant tables. They are also useful as a review artefact - the cover is the shortest honest statement of the business rules the schema encodes, and duplicated or implied rules in a specification usually mean two stakeholders described the same rule twice.
- Is the minimal cover of a dependency set unique?No. Different orders of removing extraneous attributes and redundant dependencies can produce different covers that are all minimal and all equivalent to the original set. For example, when two attributes determine each other, you can keep either one as the determinant of a third attribute but not both. Any valid cover is acceptable; claiming there is exactly one is wrong.
- What does completeness of Armstrong's axioms buy you in practice?Completeness says every dependency that logically follows from F can be derived by the three rules, and soundness says nothing else can. That equivalence between derivation and semantic implication is what justifies using the attribute-closure test as a decision procedure: if Y is inside X+, the dependency is genuinely implied, with no risk of a truth the rules cannot reach.
saying these in an interview costs you the question
- Splitting the left-hand side, e.g. inferring X -> Z from XY -> Z
- Claiming the minimal cover is unique
- Testing redundancy against the original set instead of the progressively reduced one
- Treating union and decomposition as extra axioms rather than derived rules
- Saying the axioms are heuristics rather than a sound and complete proof system