WikiGalaxy

Personalize

Functional Dependency in DBMS

Definition of Functional Dependency

Understanding Functional Dependency: In a database management system (DBMS), a functional dependency is a constraint between two sets of attributes in a relation from a database. It describes a relationship where one attribute uniquely determines another attribute.

Types of Functional Dependencies

Trivial Functional Dependency: A dependency is trivial if the dependent attribute is a subset of the determinant. For example, in a relation R(A, B), A -> A is trivial.

Non-Trivial Functional Dependency: A dependency is non-trivial if the dependent attribute is not a subset of the determinant. For example, A -> B is non-trivial in a relation R(A, B).

Armstrong's Axioms in Functional Dependency

Reflexivity: If Y is a subset of X, then X -> Y holds. This axiom is used to derive trivial dependencies.

Augmentation: If X -> Y holds, then XZ -> YZ also holds for any attribute set Z. This allows adding attributes to both sides of a dependency.

Transitivity: If X -> Y and Y -> Z hold, then X -> Z also holds. This is used to chain dependencies together.

Importance of Functional Dependency

Normalization: Functional dependencies are crucial in the process of normalization, which is used to eliminate redundancy and improve data integrity.

Database Design: They help in designing databases that are free from anomalies and ensure consistency in data storage.

Examples of Functional Dependency


    // Example of Functional Dependency
    // Consider a relation R with attributes A, B, C
    // A -> B indicates that B is functionally dependent on A
    // If two tuples have the same value for A, they must have the same value for B
    

Closure of Functional Dependency

Closure of a Set of Functional Dependencies: The closure of a set of functional dependencies is the set of all functional dependencies that can be inferred from it using Armstrong's axioms.

Minimal Cover of Functional Dependency

Minimal Cover: A minimal cover is a set of functional dependencies that is equivalent to the original set but has no redundant dependencies. It is used in database normalization.

Testing for Functional Dependency

Testing Functional Dependencies: To test if a functional dependency X -> Y holds in a relation, check if all tuples with the same X values also have the same Y values.

logo of wikigalaxy

Newsletter

Subscribe to our newsletter for weekly updates and promotions.

Privacy Policy

 • 

Terms of Service

Copyright © WikiGalaxy 2025