Inference rules in DBMS:
- Reflexivity rule: If 𝛂 is a set of attributes and 𝛃⊆𝛂, then 𝛂→ 𝛃 holds. This rule states that a set of attributes always determines
itself or any of its subsets. The functional dependency 𝛂→ 𝛃 proven by the reflexivity rule is called a trivial functional dependency.
- Augmentation rule: If 𝛂→ 𝛃 holds and 𝝲 is a set of attributes then 𝝲𝛂→ 𝝲𝛃 holds. This rule says that adding the same set of
attributes to both the left and right hand sides of a dependency results
in another valid dependency.
- Transitivity rule: If 𝛂→ 𝛃 holds and 𝛃→ 𝝲 then 𝛂→ 𝝲 holds. This rule states that functional dependencies are transitive.
- Union rule: If 𝛂→ 𝛃 holds and 𝛂→ 𝝲 holds then 𝛂→ 𝛃𝝲 holds. This rule allows us to combine a set of
functional dependency {X → A1, X → A2… X → An
} into a single functional
dependency X → {A1, A2, …, An}.
- Pseudo transitivity rule: If 𝛂→ 𝛃 and 𝝲𝛃→𝝳 holds, then 𝛂𝛃→𝝳 holds.
- Decomposition rule: If 𝛂→ 𝛃𝝲 holds then 𝛂→ 𝛃 holds and 𝛂→ 𝝲 holds.
Functional dependency is a constraint between two sets of
attributes A and B belonging to some relation R, such that for any tuples t1
and t2, if t1[A]=t2[A],then we must also have
t1[B]=t2[B] i.e. for a given value of A, there must be
only one value of B.
The functional
dependency is denoted as A → B i.e. B is
functionally dependent on A.
For ex:
Let A= ItemCd
B= { IName,
Op_stock, Cur_stock, Rate }
For a given value of ItemCd, there is only one value of all
the attributes in B or even a single attribute of B.
So we can say that
ItemCd→ { IName, Op_stock, Cur_stock, Rate }
and even
ItemCd→ IName or
ItemCd→ Op_stock and so on.
No comments:
Post a Comment