Jump to content
Wikipedia The Free Encyclopedia

Armstrong's axioms

From Wikipedia, the free encyclopedia

Armstrong's axioms are a set of axioms (or, more precisely, inference rules) used to infer all the functional dependencies on a relational database. They were developed by William W. Armstrong in his 1974 paper.[1] The axioms are sound in generating only functional dependencies in the closure of a set of functional dependencies (denoted as F + {\displaystyle F^{+}} {\displaystyle F^{+}}) when applied to that set (denoted as F {\displaystyle F} {\displaystyle F}). They are also complete in that repeated application of these rules will generate all functional dependencies in the closure F + {\displaystyle F^{+}} {\displaystyle F^{+}}.

More formally, let R ( U ) , F {\displaystyle \langle R(U),F\rangle } {\displaystyle \langle R(U),F\rangle } denote a relational scheme over the set of attributes U {\displaystyle U} {\displaystyle U} with a set of functional dependencies F {\displaystyle F} {\displaystyle F}. We say that a functional dependency f {\displaystyle f} {\displaystyle f} is logically implied by F {\displaystyle F} {\displaystyle F}, and denote it with F f {\displaystyle F\models f} {\displaystyle F\models f} if and only if for every instance r {\displaystyle r} {\displaystyle r} of R {\displaystyle R} {\displaystyle R} that satisfies the functional dependencies in F {\displaystyle F} {\displaystyle F}, r {\displaystyle r} {\displaystyle r} also satisfies f {\displaystyle f} {\displaystyle f}. We denote by F + {\displaystyle F^{+}} {\displaystyle F^{+}} the set of all functional dependencies that are logically implied by F {\displaystyle F} {\displaystyle F}.

Furthermore, with respect to a set of inference rules A {\displaystyle A} {\displaystyle A}, we say that a functional dependency f {\displaystyle f} {\displaystyle f} is derivable from the functional dependencies in F {\displaystyle F} {\displaystyle F} by the set of inference rules A {\displaystyle A} {\displaystyle A}, and we denote it by F A f {\displaystyle F\vdash _{A}f} {\displaystyle F\vdash _{A}f} if and only if f {\displaystyle f} {\displaystyle f} is obtainable by means of repeatedly applying the inference rules in A {\displaystyle A} {\displaystyle A} to functional dependencies in F {\displaystyle F} {\displaystyle F}. We denote by F A {\displaystyle F_{A}^{*}} {\displaystyle F_{A}^{*}} the set of all functional dependencies that are derivable from F {\displaystyle F} {\displaystyle F} by inference rules in A {\displaystyle A} {\displaystyle A}.

Then, a set of inference rules A {\displaystyle A} {\displaystyle A} is sound if and only if the following holds:

F A F + {\displaystyle F_{A}^{*}\subseteq F^{+}} {\displaystyle F_{A}^{*}\subseteq F^{+}}

that is to say, we cannot derive by means of A {\displaystyle A} {\displaystyle A} functional dependencies that are not logically implied by F {\displaystyle F} {\displaystyle F}. The set of inference rules A {\displaystyle A} {\displaystyle A} is said to be complete if the following holds:

F + F A {\displaystyle F^{+}\subseteq F_{A}^{*}} {\displaystyle F^{+}\subseteq F_{A}^{*}}

more simply put, we are able to derive by A {\displaystyle A} {\displaystyle A} all the functional dependencies that are logically implied by F {\displaystyle F} {\displaystyle F}.

Axioms (primary rules)

[edit ]

Let R ( U ) {\displaystyle R(U)} {\displaystyle R(U)} be a relation scheme over the set of attributes U {\displaystyle U} {\displaystyle U}. Henceforth we will denote by letters X {\displaystyle X} {\displaystyle X}, Y {\displaystyle Y} {\displaystyle Y}, Z {\displaystyle Z} {\displaystyle Z} any subset of U {\displaystyle U} {\displaystyle U} and, for short, the union of two sets of attributes X {\displaystyle X} {\displaystyle X} and Y {\displaystyle Y} {\displaystyle Y} by X Y {\displaystyle XY} {\displaystyle XY} instead of the usual X Y {\displaystyle X\cup Y} {\displaystyle X\cup Y}; this notation is rather standard in database theory when dealing with sets of attributes.

Axiom of reflexivity

[edit ]

If X {\displaystyle X} {\displaystyle X} is a set of attributes and Y {\displaystyle Y} {\displaystyle Y} is a subset of X {\displaystyle X} {\displaystyle X}, then X {\displaystyle X} {\displaystyle X} holds Y {\displaystyle Y} {\displaystyle Y}. Hereby, X {\displaystyle X} {\displaystyle X} holds Y {\displaystyle Y} {\displaystyle Y} [ X Y {\displaystyle X\to Y} {\displaystyle X\to Y}] means that X {\displaystyle X} {\displaystyle X} functionally determines Y {\displaystyle Y} {\displaystyle Y}.

If Y X {\displaystyle Y\subseteq X} {\displaystyle Y\subseteq X} then X Y {\displaystyle X\to Y} {\displaystyle X\to Y}.

Axiom of augmentation

[edit ]

If X {\displaystyle X} {\displaystyle X} holds Y {\displaystyle Y} {\displaystyle Y} and Z {\displaystyle Z} {\displaystyle Z} is a set of attributes, then X Z {\displaystyle XZ} {\displaystyle XZ} holds Y Z {\displaystyle YZ} {\displaystyle YZ}. It means that attribute in dependencies does not change the basic dependencies.

If X Y {\displaystyle X\to Y} {\displaystyle X\to Y}, then X Z Y Z {\displaystyle XZ\to YZ} {\displaystyle XZ\to YZ} for any Z {\displaystyle Z} {\displaystyle Z}.

Axiom of transitivity

[edit ]

If X {\displaystyle X} {\displaystyle X} holds Y {\displaystyle Y} {\displaystyle Y} and Y {\displaystyle Y} {\displaystyle Y} holds Z {\displaystyle Z} {\displaystyle Z}, then X {\displaystyle X} {\displaystyle X} holds Z {\displaystyle Z} {\displaystyle Z}.

If X Y {\displaystyle X\to Y} {\displaystyle X\to Y} and Y Z {\displaystyle Y\to Z} {\displaystyle Y\to Z}, then X Z {\displaystyle X\to Z} {\displaystyle X\to Z}.

Additional rules (Secondary Rules)

[edit ]

These rules can be derived from the above axioms.

Decomposition

[edit ]

If X Y Z {\displaystyle X\to YZ} {\displaystyle X\to YZ} then X Y {\displaystyle X\to Y} {\displaystyle X\to Y} and X Z {\displaystyle X\to Z} {\displaystyle X\to Z}.

Proof

[edit ]
1. X Y Z {\displaystyle X\to YZ} {\displaystyle X\to YZ} (Given)
2. Y Z Y {\displaystyle YZ\to Y} {\displaystyle YZ\to Y} (Reflexivity)
3. X Y {\displaystyle X\to Y} {\displaystyle X\to Y} (Transitivity of 1 & 2)

Composition

[edit ]

If X Y {\displaystyle X\to Y} {\displaystyle X\to Y} and A B {\displaystyle A\to B} {\displaystyle A\to B} then X A Y B {\displaystyle XA\to YB} {\displaystyle XA\to YB}.

Proof

[edit ]
1. X Y {\displaystyle X\to Y} {\displaystyle X\to Y} (Given)
2. A B {\displaystyle A\to B} {\displaystyle A\to B} (Given)
3. X A Y A {\displaystyle XA\to YA} {\displaystyle XA\to YA} (Augmentation of 1 & A)
4. Y A Y B {\displaystyle YA\to YB} {\displaystyle YA\to YB} (Augmentation of 2 & Y)
5. X A Y B {\displaystyle XA\to YB} {\displaystyle XA\to YB} (Transitivity of 3 and 4)

Union

[edit ]

If X Y {\displaystyle X\to Y} {\displaystyle X\to Y} and X Z {\displaystyle X\to Z} {\displaystyle X\to Z} then X Y Z {\displaystyle X\to YZ} {\displaystyle X\to YZ}.

Proof

[edit ]
1. X Y {\displaystyle X\to Y} {\displaystyle X\to Y} (Given)
2. X Z {\displaystyle X\to Z} {\displaystyle X\to Z} (Given)
3. X X Z {\displaystyle X\to XZ} {\displaystyle X\to XZ} (Augmentation of 2 & X)
4. X Z Y Z {\displaystyle XZ\to YZ} {\displaystyle XZ\to YZ} (Augmentation of 1 & Z)
5. X Y Z {\displaystyle X\to YZ} {\displaystyle X\to YZ} (Transitivity of 3 and 4)

Pseudo transitivity

[edit ]

If X Y {\displaystyle X\to Y} {\displaystyle X\to Y} and Y Z W {\displaystyle YZ\to W} {\displaystyle YZ\to W} then X Z W {\displaystyle XZ\to W} {\displaystyle XZ\to W}.

Proof

[edit ]
1. X Y {\displaystyle X\to Y} {\displaystyle X\to Y} (Given)
2. Y Z W {\displaystyle YZ\to W} {\displaystyle YZ\to W} (Given)
3. X Z Y Z {\displaystyle XZ\to YZ} {\displaystyle XZ\to YZ} (Augmentation of 1 & Z)
4. X Z W {\displaystyle XZ\to W} {\displaystyle XZ\to W} (Transitivity of 3 and 2)

Self determination

[edit ]

I I {\displaystyle I\to I} {\displaystyle I\to I} for any I {\displaystyle I} {\displaystyle I}. This follows directly from the axiom of reflexivity.

Extensivity

[edit ]

The following property is a special case of augmentation when Z = X {\displaystyle Z=X} {\displaystyle Z=X}.

If X Y {\displaystyle X\to Y} {\displaystyle X\to Y}, then X X Y {\displaystyle X\to XY} {\displaystyle X\to XY}.

Extensivity can replace augmentation as axiom in the sense that augmentation can be proved from extensivity together with the other axioms.

Proof

[edit ]
1. X Z X {\displaystyle XZ\to X} {\displaystyle XZ\to X} (Reflexivity)
2. X Y {\displaystyle X\to Y} {\displaystyle X\to Y} (Given)
3. X Z Y {\displaystyle XZ\to Y} {\displaystyle XZ\to Y} (Transitivity of 1 & 2)
4. X Z X Y Z {\displaystyle XZ\to XYZ} {\displaystyle XZ\to XYZ} (Extensivity of 3)
5. X Y Z Y Z {\displaystyle XYZ\to YZ} {\displaystyle XYZ\to YZ} (Reflexivity)
6. X Z Y Z {\displaystyle XZ\to YZ} {\displaystyle XZ\to YZ} (Transitivity of 4 & 5)

Armstrong relation

[edit ]

Given a set of functional dependencies F {\displaystyle F} {\displaystyle F}, an Armstrong relation is a relation which satisfies all the functional dependencies in the closure F + {\displaystyle F^{+}} {\displaystyle F^{+}} and only those dependencies. Unfortunately, the minimum-size Armstrong relation for a given set of dependencies can have a size which is an exponential function of the number of attributes in the dependencies considered.[2]

References

[edit ]
  1. ^ William Ward Armstrong: Dependency Structures of Data Base Relationships , page 580-583. IFIP Congress, 1974.
  2. ^ Beeri, C.; Dowd, M.; Fagin, R.; Statman, R. (1984). "On the Structure of Armstrong Relations for Functional Dependencies" (PDF). Journal of the ACM. 31: 30–46. CiteSeerX 10.1.1.68.9320 . doi:10.1145/2422.322414. Archived from the original (PDF) on 2018年07月23日.
[edit ]
Types
Concepts
Objects
Components
Functions
Related topics

AltStyle によって変換されたページ (->オリジナル) /