In the article, we will learn about the various Armstrong Axioms used to infer all the functional dependencies on a relational database. Then we will be checking out some secondary rules based on the Axioms and their proofs.
A functional dependency is a constraint between two sets of attributes in a database relation in relational database theory. A functional dependency, in other terms, is a constraint between two qualities in a relation.
If attribute A functionally determines attribute B, it is written as AB.
- Trivial Functional Dependency: A functional dependency AB is trivial only when B is a subset of A.
- Non Trivial Functional Dependency: AB is a functional dependency when B is not a subset of A.
It is called completely non-trivial when AB is NULL.
- Semi Non-Trivial Functional Dependency: AB is non-trivial when AB is not NULL.
Armstrong's axioms are a set of references (or, more precisely, inference rules) for inferring all of a relational database's functional dependencies. In a paper published in 1974, William W. Armstrong developed them. When applied to a set of functional dependencies (denoted as F+), the axioms are sound in generating only functional dependencies in the closure of that set (denoted as F). They're also complete in the sense that applying these rules repeatedly will cause all functional dependencies in the closure F+.
- Axiom of reflexivity:
Let A be a set of attributes, and B is a subset of A. If B⊆A then A→B. This property is Trivial property.
- Axiom of augmentation:
If A→B is true and Y is an attribute set, then AY→BY is also true. Adding attributes to dependencies does not affect the fundamental dependencies. If A→B is true, AC→BC is true for any C.
- Axiom of transitivity:If A→B holds and B→C holds, then A→C also holds, similar to the transitive rule in Algebra. Functionally, A→B is referred to as A, which determines B. If X→Y and Y→Z are true, X→Y is true.
If A→BC, then A→B and A→C
A→BC (given)_______________ (i)
BC→B (reflexivity)____________ (ii)
A→B (transitivity from i and ii)
If A→B and C→D then AC→BD
AC→BC________(iii) (Augmentation of i and C)
AC→B________(iv) Decomposition of iii)
AC→AD_______(v) (Augmentation of ii and A)
AC→D___________(vi) (Decomposition of v)
AC→BD________ (Union iv and vi)
3. Union (Notation)
If A→B and A→C then A→BC
A→AC_______(iii) (Augmentation of ii and A)
AC→BC______(iv) (Augmentation of i and C)
A→BC________(transitivity of iii and ii)
4. Pseudo transitivity
If A→B and BC→D then AC→D
AC→BC_______(iii) (Augmentation of i and C)
AC →D_________(Transitivity of iii and ii)
A→A for any given A.
This rule directly follows the Axiom of Reflexivity.
Extensivity is a particular case of augmentation where C=A
If A→B, then A→AB
In the sense that augmentation can be proven from extensivity and other axioms, extensivity can replace augmentation as an axiom.
AC→B________(iii) (Transitivity of i and ii)
AC→ABC_______(iv) (Extensivity of iii)
AC→BC (Transitivity of iv and v)
An Armstrong relation is a relation that satisfies all of the functional dependencies in the closure F+ and only those dependencies, given a set of functional dependencies F. Unfortunately, for a given set of dependencies, the minimum-size Armstrong relation can have a size that is an exponential function of the number of attributes in the dependencies under consideration.
Why do the Sound and Complete axioms appear in the Armstrong axioms?
By sound, we mean that any dependency may be stated on a relation schema R given a set of functional dependencies F specified on a relation schema R, any dependency inferred from F using the Armstrong axioms primary rules holds in every relation state r of R that satisfies the dependencies in F.
By complete, we mean that repeatedly inferring dependencies using primary Armstrong axioms until no more dependencies can be inferred results in the complete set of all possible dependencies implied from F.
Frequently Asked questions
- For what purpose are the Armstrong Axioms used?
The axioms of Armstrong are used to determine the functional dependencies of a relational database. A type of assertion is the inference rule. It can e used to derive other FDs from a set of FDs (functional dependencies). The inference rule can derive additional functional dependency from the initial stage.
- What are the primary rules of Armstrong Axioms?
Following are the primary rules of Armstrong Axioms:
We have already covered the Axioms in detail in the above article.
- What is the purpose of inference rules?
The templates or instructions for creating valid arguments from the statements we currently know are provided by Rules of Inference.
In the article, we discussed functional dependencies briefly and what Armstrong Axioms are. We saw various axioms included in Armstrong Axioms. And then, we looked into different secondary rules based on the axioms and their proofs.
Ninja, don't stop here; check out the Top 100 SQL Problems to get hands-on experience with frequently asked interview questions and land your dream job. Also, try CodeStudio to practice programming problems for your complete interview preparation.