26/7/23, 20:07 Intro to Functional Dependencies - Database Design Fundamentals for Software Engineers
Intro to Functional Dependencies
In this lesson, we will discuss the basic concepts of functional dependencies.
We'll cover the following
• Introduction
• Example
Introduction
One important theory developed for the entity relational (ER) model
involves the notion of functional dependency (FD). The aim of studying this
is to improve your understanding of relationships among data and to gain
enough formalism to assist with practical database design.
A functional dependency is a relationship between two attributes, typically
the primary key (PK) and other non-key attributes within a table. For any
relation R, attribute Y is functionally dependent on attribute X, if, for every
valid instance of X, that value of X uniquely determines the value of Y. This
relationship is indicated by the representation below :
X Y
determinant dependent
The left side of the above FD diagram is called the determinant, and the
right side is the dependent.
https://www.educative.io/courses/database-design-fundamentals/gx3vnK4gjM9 1/3
26/7/23, 20:07 Intro to Functional Dependencies - Database Design Fundamentals for Software Engineers
Example
STUDENT relation
Student_Id Name Age
1 Spencer 22
2 Tony 20
3 Mark 23
4 Elyse 21
From the table above, it is obvious that Student_Id is the primary key as it is
unique for each student.
So, following the above definition for functional dependencies, we conclude
that:
Student_Id→Name,
Student_Id→Age,
Since we can determine both the name and age of the student through
his/her Student_Id.
In the next lesson, we will look at the rules of functional dependencies.
Back Next
Quiz! Rules of Functional De…
Completed
https://www.educative.io/courses/database-design-fundamentals/gx3vnK4gjM9 2/3
26/7/23, 20:07 Intro to Functional Dependencies - Database Design Fundamentals for Software Engineers
https://www.educative.io/courses/database-design-fundamentals/gx3vnK4gjM9 3/3