Functional Dependency in Relational Database

Functional Dependency :

Functional dependency is a constraint between two sets of attributes in a relation from a database. In other words, it's a relationship that exists when one attribute uniquely determines another attribute. In functional dependency the attributes of a table is said to be dependent on each other when an attribute of a table uniquely identifies another attribute of the same table.


For example: consider the above table 'student' with attributes : Student_id, Student_name, City, Age, Subject. Here Student_id attribute uniquely identifies the Student_name attribute of student table because if we know the student id we can tell the student name associated with it. This is known as functional dependency and can be written as Student_id -> Student_name or in words we can say Student_name is functionally dependent on Student_id.

Functional dependency is represented by an arrow sign (→) that is, XY, where X functionally determines Y. The left-hand side attributes determine the values of attributes on the right-hand side (Attribute Y is functionally dependent on attribute X or in other words each value of X is associated precisely with one Y value). Functional dependency in a database serves as a constraint between two sets of attributes. Defining functional dependency is an important part of relational database design and contributes to aspect normalization.

Types of Functional Dependencies :


  • Trivial functional dependency
  • Non-trivial functional dependency
  • Multi-valued dependency
  • Transitive dependency


Next Topic :- 

No comments:

Post a Comment