Monday 7 December 2020

DBMS Inference Rules

 

Inference rules in DBMS:

 

  1. 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.
  2. 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.
  3. Transitivity rule: If 𝛂𝛃 holds and 𝛃𝝲 then 𝛂𝝲 holds. This rule states that functional dependencies are transitive.
  4. 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}.
  5. Pseudo transitivity rule: If 𝛂𝛃 and 𝝲𝛃𝝳 holds, then 𝛂𝛃𝝳 holds.
  6. 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