Functional Dependency in DBMS
Last Updated :
23 Jul, 2025
A functional dependency occurs when the value of one attribute (or a set of attributes) uniquely determines the value of another attribute. This relationship is denoted as:
X → Y
Here, X is the determinant, and Y is the dependent attribute. This means that for each unique value of X, there is precisely one corresponding value of Y.
Example:
Consider a table named Students with the following attributes:
- StudentID
- StudentName
- StudentAge
If each student has a unique StudentID, and this ID determines the student's name, we can express this functional dependency as:
StudentID → StudentName
This indicates that knowing the StudentID allows us to determine the StudentName.
StudentID | StudentName | StudentAge |
|---|
101 | Rahul | 23 |
|---|
102 | Ankit | 22 |
|---|
103 | Aditya | 22 |
|---|
104 | Sahil | 24 |
|---|
Functional DependencyHow to represent functional dependency in DBMS?
- Functional dependency is expressed in the form of equations. For example, if we have an employee record with fields "EmployeeID", "FirstName" and "LastName" we can specify the function as follows:
EmployeeID -> FirstName, LastName
- To represent functional dependency in DBMS has two main features: left (LHS) and right (RHS) of the arrow (->).
- For example, if we have a table with attributes "X", "Y" and "Z" and the attribute "X" can determine the value of the attributes "Y" and "Z".
X -> Y, Z
- This symbol indicates that the value in property "X" determines the values ​​in property "Y" and "Z". So if you know the value of "X", you can also determine the value of "Y" and "Z".
Types of Functional Dependency in DBMS
The following are some important types of FDs in DBMS:
Trivial Functional Dependency
The dependency of an attribute on a set of attributes is known as trivial functional dependency if the set of attributes includes that attribute.
Non-trivial Functional Dependency
If a functional dependency X→Y holds true where Y is not a subset of X then this dependency is called non trivial Functional dependency.
Multivalued Dependency
A multivalued dependency happens when there are at least three attributes (let us say X, Y and Z), and for a value of X there is a well defined set of values of Y and a well defined set of values of Z. However, the set of values of Y is independent of set Z and vice versa.
Semi Non Trivial Functional Dependencies
X -> Y is called semi non-trivial when X intersect Y is not NULL.
Transitive Functional Dependency
Transitive functional dependency in DBMS is the relationship between attributes (columns) of a database table. This occurs when the price of one property determines the price of another property through an intermediate (third) factor.
Please refer types of functional dependencies for more details.
Armstrong’s Axioms in Functional Dependency
Reflexivity: If A is a set of attributes and B is a part of A, then the function A -> B is valid.
Augmentation: If the A -> B dependency is valid, adding multiple elements to either side of the dependency will not affect the dependency.
Transitivity: If the functions X → Y and Y → Z are both valid, then X → Z is also valid according to the transitivity rule.
Read more about Armstrong’s Axioms in Functional Dependency in DBMS.
Benefits of Functional Dependency in DBMS
Functional dependency in a database management system offers several advantages for businesses and organizations:
- Prevents Duplicate Data:Functional dependency helps avoid storing the same data repeatedly in the database, reducing redundancy and saving storage space.
- Improves Data Quality and Accuracy:By organizing data efficiently and minimizing duplication, functional dependency ensures the data is reliable, consistent, and of high quality.
- Reduces Errors: Keeping data organized and concise lowers the chances of errors in records or datasets, making it easier to manage and update information.
- Saves Time and Costs: Properly organized data allows for quicker and easier access, improving productivity and reducing the time and cost of managing information.
- Defines Rules and Behavrs: Functional dependency allows setting rules and constraints that control how data is stored, accessed, and maintained, ensuring better data management.
- Helps Identify Poor Database Design: It highlights issues like scattered or missing data across tables, helping identify and fix design flaws to maintain consistency and integrity.
Explore
Basics of DBMS
ER & Relational Model
Relational Algebra
Functional Dependencies & Normalisation
Transactions & Concurrency Control
Advanced DBMS
Practice Questions