# Inference Rule

Inference rule is a type of assertion which is applied in DBMS to derive new functional dependencies from already existing functional dependencies. William Armstrong developed these axioms in 1974. Hence these axioms are also known as Armstrong’s axioms.

## Types of Inference Rules

There are six types of inference rules that are followed. These are:

1. Reflexive Rule
2. Augmentation Rule
3. Transitive Rule
4. Union Rule
5. Decomposition Rule
6. Pseudo Transitive Rule

Let us study these rules in detail one by one.

### Reflexive Rule

Reflexive Inference Rule states that, if X is a set of attributes, and if Y is a subset of X i.e., X  Y then Y is functionally determined by X.

### Augmentation Rule

In Augmentation Rule, if X determines Y i.e., X -> Y and Z is any other attribute of the relation R, then XZ will determine YZ i.e., XZ -> YZ. The other name for Augmentation is partial dependency.

To simplify, the rule states: if X -> Y then XZ -> YZ.

### Transitive Inference Rule

Transitive Inference Rule states that, if X determines Y and if Y determines Z, then X will also determine Z.

To simplify, the rule states: if X -> Y and Y ->Z then X -> Z.

### Union Inference Rule

According to Union Rule, if X determine Y, and X also determines Z, then X must determine both Y and Z. Union Rule is also known as Additive Rule.

To simplify, the rule states that: if X -> Y and X ->Z then X ->Y Z.

Let ustake a look at the proof of the above assertion.

Step 1. X -> Y (Given)

Step 2. X -> Z (Given)

Step 3. X ->XY (Using Augmentation Rule with X on step 1. XX is written as X)

Step 4. XY -> YZ (Using Augmentation Rule with Y on step 2)

Step 5. X -> YZ (Using Transitivity Rule on Step 3 and Step 4)

### Decomposition Rule

Decomposition Rule is the reverse of the Union Rule. Decomposition Rule says that, if X determines Y and Z, then X determines Y and X determines Z as well.

To simplify, the rule states that: if X -> YZ then X -> Y and X ->Z also.

This rule is also known as ProjectRule.

Let us take a look at the proof of the above assertion.

Step 1. X -> YZ (Given)

Step 2. YZ -> Y and YZ -> Z (using Reflexive Rule)

Step 3. X -> Y and X -> Z (using Transitive Rule on step 1 and step 2)

### Pseudo Transitive Inference Rule

Pseudo Transitive Inference Rule states that, if X determines Y, and YZ determines A then, XZ determines A.

In simple words, the rule states that: if X -> Y and YZ -> A then, XZ -> A.

Let us take a look at the proof of the above assertion.

Step 1. X -> Y (Given)

Step 2. XZ -> YZ(using Augmentation rule with Z on step 1)

Step 3. YZ -> A (Given)

Step 4. XZ -> A (using Transitive Rule on step 2 and step 3)