Functional Dependencies in DBMS

πŸ“˜ DBMS πŸ‘ 84 views πŸ“… Nov 14, 2025
⏱ Estimated reading time: 2 min

Functional Dependency (FD) is a fundamental concept in relational database theory used to describe the relationship between attributes in a relation. It forms the basis of normalization, helps in detecting anomalies, and ensures data integrity.


Definition

A functional dependency exists between two sets of attributes X and Y in a relation R if:

➑️ X uniquely determines Y
This is written as:

X β†’ Y

This means:
If two tuples have the same value of X, they must also have the same value of Y.

Example:

StudentID β†’ StudentName
If StudentID is known, the StudentName is uniquely determined.


Types of Functional Dependencies

1️⃣ Trivial Functional Dependency

A dependency is trivial if the right-hand side is a subset of the left-hand side.

Example:

{A, B} β†’ A (Trivial FD)

These dependencies always hold true.


2️⃣ Non-Trivial Functional Dependency

If Y is not a subset of X, then X β†’ Y is non-trivial.

Example:
RollNo β†’ StudentName


3️⃣ Fully Functional Dependency

A non-key attribute is fully functionally dependent on the whole candidate key, not on a part of it.

Example:

In a relation with key (StudentID, CourseID):

(StudentID, CourseID) β†’ Grade
This is a full FD.


4️⃣ Partial Dependency

If a non-key attribute depends only on part of a composite key, it is partial dependency.

Example:

StudentID β†’ StudentName
(from composite key (StudentID, CourseID))

Partial dependencies violate 2NF.


5️⃣ Transitive Dependency

A β†’ B and B β†’ C implies A β†’ C (indirect dependency)

Example:
StudentID β†’ Department
Department β†’ HOD
So, StudentID β†’ HOD (transitive)

Transitive dependencies violate 3NF.


6️⃣ Multivalued Dependency (MVD)

Used in 4NF.
X β†  Y means Y values are independent of other attributes and multiple values may exist.


Why Functional Dependencies Are Important?

FDs help to:

βœ” Design efficient database structures

βœ” Remove redundancy

βœ” Identify candidate keys

βœ” Perform normalization

βœ” Avoid anomalies (update, insert, delete)


Example: Functional Dependencies in a Table

Consider a table:

RollNoNameCourseDept

Possible FDs:

  • RollNo β†’ Name

  • RollNo β†’ Course

  • Course β†’ Dept

Using these, we can identify keys and normalize the table.


Armstrong’s Axioms (Rules for FD Inference)

  1. Reflexivity: If Y βŠ† X, then X β†’ Y

  2. Augmentation: If X β†’ Y, then XZ β†’ YZ

  3. Transitivity: If X β†’ Y and Y β†’ Z, then X β†’ Z

Using these axioms, new FDs can be derived.


Conclusion

Functional Dependencies are crucial in relational database design. They describe how attributes relate to each other, helping detect redundant data, find candidate keys, and guide normalization (1NF to BCNF and beyond). Understanding FDs ensures efficient, consistent, and logically structured databases.


πŸ”’ Some advanced sections are available for Registered Members
Register Now

Share this Post


← Back to Tutorials

Popular Competitive Exam Quizzes