- DBMS - Home
- DBMS - Overview
- DBMS - Architecture
- DBMS - Data Models
- DBMS - Data Schemas
- DBMS - Data Independence
- DBMS - System Environment
- Centralized and Client/Server Architecture
- DBMS - Classification
- Relational Model
- DBMS - Codd's Rules
- DBMS - Relational Data Model
- DBMS - Relational Model Constraints
- DBMS - Relational Database Schemas
- DBMS - Handling Constraint Violations
- Entity Relationship Model
- DBMS - ER Model Basic Concepts
- DBMS - ER Diagram Representation
- Relationship Types and Relationship Sets
- DBMS - Weak Entity Types
- DBMS - Generalization, Aggregation
- DBMS - Drawing an ER Diagram
- DBMS - Enhanced ER Model
- Subclass, Superclass and Inheritance in EER
- Specialization and Generalization in Extended ER Model
- Data Abstraction and Knowledge Representation
- Relational Algebra
- DBMS - Relational Algebra
- Unary Relational Operation
- Set Theory Operations
- DBMS - Database Joins
- DBMS - Division Operation
- DBMS - ER to Relational Model
- Examples of Query in Relational Algebra
- Relational Calculus
- Tuple Relational Calculus
- Domain Relational Calculus
- Relational Database Design
- DBMS - Functional Dependency
- DBMS - Inference Rules
- DBMS - Minimal Cover
- Equivalence of Functional Dependency
- Finding Attribute Closure and Candidate Keys
- Relational Database Design
- DBMS - Keys
- Super keys and candidate keys
- DBMS - Foreign Key
- Finding Candidate Keys
- Normalization in Database Designing
- Database Normalization
- First Normal Form
- Second Normal Form
- Third Normal Form
- Boyce Codd Normal Form
- Difference Between 4NF and 5NF
- Structured Query Language
- Types of Languages in SQL
- Querying in SQL
- CRUD Operations in SQL
- Aggregation Function in SQL
- Join and Subquery in SQL
- Views in SQL
- Trigger and Schema Modification
- Storage and File Structure
- DBMS - Storage System
- DBMS - File Structure
- DBMS - Secondary Storage Devices
- DBMS - Buffer and Disk Blocks
- DBMS - Placing File Records on Disk
- DBMS - Ordered and Unordered Records
- Indexing and Hashing
- DBMS - Indexing
- DBMS - Single-Level Ordered Indexing
- DBMS - Multi-level Indexing
- Dynamic B- Tree and B+ Tree
- DBMS - Hashing
- Transaction and Concurrency
- DBMS - Transaction
- DBMS - Concurrency Control
- DBMS - Deadlock
- Backup and Recovery
- DBMS - Data Backup
- DBMS - Data Recovery
- DBMS Useful Resources
- DBMS - Quick Guide
- DBMS - Useful Resources
- DBMS - Discussion
Inference Rules in DBMS
Functional Dependency is one of the fundamental concepts in DBMS and we apply this concept in Database Designing. One must understand the rules and properties of functional dependency to design efficient and normalized databases.
Functional Dependencies describe how attributes determine one another and ensure that we correctly interpret relationships within a table. In this chapter, we will explain in detail the properties of functional dependencies, which are also known as Armb axioms. We will also take a look at the inference rules derived from the Armb axioms.
Basics of Functional Dependency
First, let's have a basic recap of functional dependency. In simple terms, if attribute X can be used to uniquely identify attribute Y, we say that "X determines Y". We can also say that "Y is functionally dependent on X". This is denoted as "X → Y".
For example, consider a table where −
- X is a roll number, and
- Y includes student details like name, department, and building.
If each roll number is uniquely identifies a student and their associated details, we can say "Roll Number → Student Details". Here, Roll Number is the determinant, and Student Details is the dependent.
Armb Axioms: Properties of Functional Dependency
Let us now understand the properties for functional dependencies.
The Reflexivity Property
The reflexivity property states that if A is a set of attributes, and B is a subset of A, then A → B is a valid functional dependency. It means an attribute set can always determine its subset.
Example − Consider a table with attributes A = {Name, Age, ID}. If we take B = {ID}, which is a subset of A, then A → B is a functional dependency.
If we know Name, Age, and ID, we can obviously identify the ID. This is why reflexivity is considered a fundamental rule.
The Augmentation Property
The augmentation property is about adding additional attributes to both sides of a dependency. If A → B is a valid functional dependency. By adding any set of attributes C to both A and B will still preserve the dependency.
Example − Let us say "Roll Number → Department" is a functional dependency. If we augment this by adding Class to both sides, we get "Roll Number, Class → Department, Class". This new dependency is also valid.
The augmentation rule emphasizes that adding more context does not change the relationship already established by A → B.
The Transitivity Property
The transitivity property is perhaps the most intuitive. If A → B and B → C, then A → C must also hold true.
Example − Let us consider the following –
- Roll Number → Student NameRoll
- Student Name → Department
By transitivity, we can conclude that Roll Number → Department.
It is like saying: If knowing Roll Number helps us to figure out Student Name. And knowing Student Name helps us to find Department. Then knowing Roll Number determines Department.
Inference Rules Derived from Armb Axioms
In addition to the three core axioms, there are several inference rules or secondary rules. This is derived from Armb axioms. These rules help simplify or combine dependencies.
The Union Rule
The union rule states that if A → B and A → C, then A → BC. In other words, if A can determine B and A can determine C, then A can determine both B and C together.
Example − If Roll Number → Student Name and Roll Number → Department, we can combine these into a single dependency: Roll Number → Student Name, Department.
Union simplifies the representation of dependencies by merging them.
The Composition Rule
The composition rule is another extension on the union rule. It states that if A → B and C → D, then AC → BD. Essentially, we combine determinants and dependents from two dependencies.
Example: Consider, Roll Number → Student Name. Class → Teacher. By composition, we can say Roll Number, Class → Student Name, Teacher.
The Decomposition Rule
The decomposition rule is the opposite of union. If A → BC, we can break it down into A → B and A → C.
Example − If Roll Number → Student Name, Department, we can decompose this into −
- Roll Number → Student Name
- Roll Number → Department
Decomposition is helpful for simplifying complex dependencies.
The Pseudo-Transitivity Rule
The pseudo-transitivity rule is a variation of transitivity. If A → B and BC → D, then AC → D.
Example − Consider Roll Number → Class. Class, Teacher → Subject.
Using pseudo-transitivity, we can conclude that Roll Number, Teacher → Subject.
This rule shows how to combine dependencies even when the second dependency has multiple determinants.
Importance of Inference Rules
These properties and rules help database designers validate and manipulate functional dependencies effectively. They allow us to −
- Simplify dependencies by combining or breaking them down.
- Check for redundancies in relationships between attributes.
- Normalize databases, ensuring efficiency and reducing anomalies like update, insert, or delete issues.
Conclusion
In this chapter, we covered the core rules of functional dependency and how they help structure database relationships. We started with the Armb axioms (reflexivity, augmentation, and transitivity) and understood their role in defining dependencies. Thereafter, we explored inference rules like union, composition, decomposition, and pseudo-transitivity. Functional dependencies are not just abstract concepts; they are practical tools for creating efficient and reliable databases.