
- DBMS Tutorial
- DBMS - Home
- DBMS - Overview
- DBMS - Architecture
- DBMS - Data Models
- DBMS - Data Schemas
- DBMS - Data Independence
- Entity Relationship Model
- DBMS - ER Model Basic Concepts
- DBMS - ER Diagram Representation
- DBMS - Generalization, Aggregation
- Relational Model
- DBMS - Codd's Rules
- DBMS - Relational Data Model
- DBMS - Relational Algebra
- DBMS - ER to Relational Model
- DBMS- SQL Overview
- Relational Database Design
- DBMS - Database Normalization
- DBMS - Database Joins
- Storage and File Structure
- DBMS - Storage System
- DBMS - File Structure
- Indexing and Hashing
- DBMS - Indexing
- 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
Functional dependency in DBMS
What is Functional Dependency
Functional dependency in DBMS, as the name suggests is a relationship between attributes of a table dependent on each other. Introduced by E. F. Codd, it helps in preventing data redundancy and gets to know about bad designs.
To understand the concept thoroughly, let us consider P is a relation with attributes A and B. Functional Dependency is represented by -> (arrow sign)
Then the following will represent the functional dependency between attributes with an arrow sign −
A -> B |
Above suggests the following:
Example
The following is an example that would make it easier to understand functional dependency −
We have a <Department> table with two attributes − DeptId and DeptName.
DeptId = Department ID DeptName = Department Name |
The DeptId is our primary key. Here, DeptId uniquely identifies the DeptName attribute. This is because if you want to know the department name, then at first you need to have the DeptId.
DeptId | DeptName |
001 | Finance |
002 | Marketing |
003 | HR |
Therefore, the above functional dependency between DeptId and DeptName can be determined as DeptId is functionally dependent on DeptName −
DeptId -> DeptName |
Types of Functional Dependency
Functional Dependency has three forms −
- Trivial Functional Dependency
- Non-Trivial Functional Dependency
- Completely Non-Trivial Functional Dependency
Let us begin with Trivial Functional Dependency −
Trivial Functional Dependency
It occurs when B is a subset of A in −
A ->B |
Example
We are considering the same <Department> table with two attributes to understand the concept of trivial dependency.
The following is a trivial functional dependency since DeptId is a subset of DeptId and DeptName
{ DeptId, DeptName } -> Dept Id |
Non –Trivial Functional Dependency
It occurs when B is not a subset of A in −
A ->B |
Example
DeptId -> DeptName |
The above is a non-trivial functional dependency since DeptName is a not a subset of DeptId.
Completely Non - Trivial Functional Dependency
It occurs when A intersection B is null in −
A ->B |
Armstrong’s Axioms Property of Functional Dependency
Armstrong’s Axioms property was developed by William Armstrong in 1974 to reason about functional dependencies.
The property suggests rules that hold true if the following are satisfied:
- Transitivity
If A->B and B->C, then A->C i.e. a transitive relation. - Reflexivity
A-> B, if B is a subset of A. - Augmentation
The last rule suggests: AC->BC, if A->B
- Related Articles
- Fully-functional dependency in DBMS
- What is functional dependency in DBMS?
- What is functional dependency and transitive dependency (DBMS)?
- Partial Dependency in DBMS
- Transitive dependency in DBMS
- Multivalued dependency in DBMS
- Join dependency in DBMS
- Explain join dependency in DBMS
- What is Transitive dependency in DBMS?
- What is multivalued dependency in DBMS?
- What is Multivalued Dependency (DBMS)?
- Explain about partial and fully functional dependency
- Explain the inference rules for functional dependencies in DBMS
- Which normal form is the highest that satisfies the functional dependencies(DBMS)?
- Dependency Injection in C#
