Open In App

Inference Rules in DBMS

Last Updated : 01 May, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Inference rules in databases are also known as Armstrong’s Axioms in Functional Dependency. These rules govern the functional dependencies in a relational database. From inference rules a new functional dependency can be derived using other FDs. These rules were introduced by William W. Armstrong. In this article, we will come to know about all the rules proposed by him. Also, we will be exploring the prerequisites for it and will understand the topic in a better way.

Prerequisites

  • Attributes: When we talk about databases, we think of them as organized collections of information. Imagine that you have a table called “Student.” Now, this table has columns, which we also call “Attributes.” These columns define specific details about the students. For example:
    • Student_name: This column stores the names of the students.
    • Roll_no: Here, we keep track of their roll numbers.
    • Marks: And finally, we record their exam scores.
  • Functional Dependencies (FDs) are like the building blocks of a database. Imagine you have a bunch of attributes (think of them as characteristics) in a table. These attributes can be related to each other in interesting ways or say logically. For example, Roll_no → Marks means that from Roll_no we can get the Marks of the student, which shows that they are Roll_no is logically related to Marks.

Inference Rules

There are 6 inference rules, which are defined below:

  • Reflexive Rule: According to this rule, if B is a subset of A then A logically determines B. Formally, B ⊆ A then A → B.
    • Example: Let us take an example of the Address (A) of a house, which contains so many parameters like House no, Street no, City etc. These all are the subsets of A. Thus, address (A) → House no. (B).
  • Augmentation Rule: It is also known as Partial dependency. According to this rule, If A logically determines B, then adding any extra attribute doesn’t change the basic functional dependency.
    • Example: A → B, then adding any extra attribute let say C will give AC → BC and doesn’t make any change.
  • Transitive rule: Transitive rule states that if A determines B and B determines C, then it can be said that A indirectly determines B.
    • Example: If A → B and B → C then A → C.
  • Union Rule: Union rule states that If A determines B and C, then A determines BC.
    • Example: If A → B and A → C then A → BC.
  • Decomposition Rule: It is perfectly reverse of the above Union rule. According to this rule, If A determined BC then it can be decomposed as A → B and A → C.
    • Example: If A → BC then A → B and A → C.
  • Pseudo Transitive Rule: According to this rule, If A determined B and BC determines D then BC determines D.
    • Example: If A → B and BC → D then AC → D.

Conclusion

In this article, we get to know about all the inference rules in DBMS and some basic terminologies related to it. Along with this we also learn that what are functional dependencies and how they are interrelated in the structured table inside the Database Management System.

Frequently Asked Questions on Inference Rules – FAQs

How Many Inference Rules are there name them?

There are 6 inference rules. Which are defined below:

  • Reflexive Rule
  • Augmentation Rule
  • Transitive Rule
  • Union Rule
  • Decomposition Rule
  • Pseudo Transitive Rule

What are FDs?

FDs stands for Functional Dependencies. These are the set of attributes, which are logically related to each other.

Inference rules are proposed by whom?

These rules were introduced by William W. Armstrong

Inference rules also known as what?

These rules are also known as Armstrong’s Axioms in Functional Dependency.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads