---
title: "What is Functional Dependency?"  
description: "What is Functional Dependency?"  
author: "Sumit Kesarwani"  
published: 2014-09-22  
updated: 2023-05-01  
canonical: https://www.mindstick.com/interview/2176/what-is-functional-dependency  
category: "database"  
tags: ["database"]  
reading_time: 2 minutes  

---

# What is Functional Dependency?

A Functional dependency is denoted by X Y between two sets of attributes X and Y that are subsets of R specifies a constraint on the possible tuple that can form a relation state r of R. The constraint is for any two tuples t1 and t2 in r if t1[X] = t2[X] then they have t1[Y] = t2[Y]. This means the value of X component of a tuple uniquely determines the value of component Y.

## Answers

### Answer by Aryan Kumar

In the context of relational databases, functional dependency is a relationship between two attributes (or columns) in a relation (or table), in which the value of one attribute determines the value of another attribute.

Formally, we say that attribute A is functionally dependent on attribute B if, for every value of B, there is a unique value of A. This is denoted as B → A.

For example, consider a table named "employees" with columns "employee_id", "employee_name", and "department_name". In this table, we can say that "department_name" is functionally dependent on "employee_id" because for every unique "employee_id", there is a unique "department_name" associated with it.

Functional dependencies are important in database design because they help to ensure that the data in a relation is well-formed and free from redundancy. By identifying the functional dependencies in a relation, we can determine the minimal set of attributes required to represent the data, and eliminate any redundant or unnecessary attributes.

Functional dependencies are also used in normalization, which is a process of refining a relation into smaller, well-organized relations, to minimize data redundancy and improve data integrity.

### Answer by Sumit Kesarwani

A Functional dependency is denoted by X Y between two sets of attributes X and Y that are subsets of R specifies a constraint on the possible tuple that can form a relation state r of R. The constraint is for any two tuples t1 and t2 in r if t1[X] = t2[X] then they have t1[Y] = t2[Y]. This means the value of X component of a tuple uniquely determines the value of component Y.


---

Original Source: https://www.mindstick.com/interview/2176/what-is-functional-dependency

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
