Goseeko blog

What is Functional Dependencies?

by Bhumika

Functional Dependency (FD) is a constraint in a database management system that specifies the relationship of one attribute to another attribute (DBMS). Furthermore, Functional Dependency helps to maintain the database’s data quality. Finding the difference between good and poor database design plays a critical role. 

The arrow “→” signifies a functional dependence. X→ Y is defined by the functional dependence of X on Y.

Rules of Functional Dependencies 

The three most important rules for Database Functional Dependence are below: 

Reflexive law: X holds a value of Y if X is a set of attributes and Y is a subset of X. Augmentation rule: If x -> y holds, and c is set as an attribute, then ac -> bc holds as well. That is to add attributes that do not modify the fundamental dependencies. 

Transitivity law: If x -> y holds and y -> z holds, this rule is very similar to the transitive rule in algebra, then x -> z also holds. X -> y is referred to as functionally evaluating y.

Types of functional dependency

1. Trivial Functional Dependency

A → B has trivial FD if B is a subset of A.

The following dependencies are also trivial like: A → A, B → B

Example 

Consider a table with two columns Employee_Id and Employee_Name.  

{Employee_id, Employee_Name}   →    Employee_Id is a trivial FD as   

Employee_Id is a subset of {Employee_Id, Employee_Name}.  

Also, Employee_Id → Employee_Id and Employee_Name   →    Employee_Name are trivial dependencies too.  

2. Non – trivial Functional Dependencies 

A → B has a non-trivial FD if B is not a subset of A.

When A intersection B is NULL, then A → B is called as complete non-trivial.

Example:

ID   →    Name, 

Name   →    DOB 

3. Multivalued Dependency

When there are numerous independent multivalued characteristics in a single table, multivalued dependency occurs. Additionally, A complete constraint between two sets of characteristics in a relation is a multivalued dependency. Moreover, It necessitates the presence of specific tuples in a relation.

4. Transitive Dependency

A transitive dependency is a sort of FD that occurs when two functional dependencies are generated indirectly.

Interested in learning about similar topics? Here are a few hand-picked blogs for you!

  1. What is ACID property?
  2. Explain Single source shortest path?
  3. What is Greedy algorithm?
  4. Illustrate DBMS?

You may also like