×

Functional Dependencies

Functional Dependencies (FD) in the relational database management system occurs when one attribute in a relation uniquely determines other attribute in that relation. It describes the relation between the attributes. The term functional dependency was introduced by E.F Codd. It is used to define different normal forms and helps in preventing data redundancy.

For an attribute X, there should exist only one value of Y. It means that X determines Y or Y is functionally dependent on X.
A functional dependency of X on Y can be represented as X ? Y.
Here, Y is the dependent attribute, and X is the determinant set. Functional dependency may also be based on the composite attributes of the relation.

For example:
Table: Student

student_id Name Course Age
101 Amit MCA 20
102 Kartikey MBA 21
103 Krishna MCA 20

In the above table Student, if you know the value of student_id of any student which is unique for each student, you can obtain Name, Course, and age of that student with the help of that student_id.

By this, we can say that the Age, Name, and Course are functionally dependent on student_id, or we can say student_id determines Age, Name and Course of the Student.

student_id ? Name, Age, Course

Types of Functional Dependencies:

There are two types of functional dependencies:

  1. Trivial Functional Dependency
  2. Non-trivial Functional Dependency

1. Trivial Functional Dependency

X ? Y is said to be trivial functional dependency when Y is a subset of X, i.e., ? X.
X ? X and Y ? Y are also trivial functional dependency.

Example:
Table: Student

student_id Name
101 Amit
102 Kartikey
103 Krishna

Above table consists of two columns: student_id and Name.

{student_id, Name} -> student_id is a trivial functional dependency as student_id is a subset of {student_id,Name}.

2. Non-trivial Functional Dependency

X ? Y is said to bea non-trivial functional dependency, if and only if Y is not a subset of X, i.e., ? X. It can also be defined as when at least one attribute in the right side of FD is not a part of the left side of FD.

Example:
Table: Student

student_id Name
101 Amit
102 Kartikey
103 Krishna

Above table consists of two columns student_id and Name.

student_id -> Name is a non-trivial functional dependency as Name is not a subset of student_id

Advantages of Functional Dependency

  • Functional Dependency removes data redundancy where the same values should not be repeated at multiple locations in the same database table.
  • It maintains the quality of data in the database.
  • FD allows clearly defined meanings and constraints of databases.
  • It helps in identifying bad designs of the database.
  • It expresses the facts about the database design.


Related Topics

Schedule in DBMS

Schedule A sequence of statements that specify the sequential order in which the statements of concurrent transactions are executed. The transaction will get committed when it executes the instructions successfully without any...

4 minutes read.

Network model in DBMS

Network model: The many-to-many relationship between the database constraints is represented hierarchically by the Network Model in DBMS. It is a straightforward and straightforward database model. Due to the Network Model...

4 minutes read.

Redundancy in Database Management System

Redundancy in a database management system (DBMS) refers to the duplication of data within the database. This duplication can occur in multiple ways, such as having multiple copies of the...

13 minutes read.

Conversion of ER Diagram into Relational Model

After designing the Entity-Relationship diagram, you need to convert it into tables in the relational model. Because the relational model can be easily implemented by the Relational DBMS like Oracle, MySQL, etc....

2 minutes read.

Specialization in DBMS

Specialization in DBMS In the database management system, specialization breaks the higher-level entity into two or more than two lower entities. The main motive of this concept is to share the...

2 minutes read.

DBMS Schema

Schema It is a physical representation of data that appears in the database management system. In simple words, a schema is the structure of any database.It defines how the data is stored...

2 minutes read.

3- Tier Architecture in DBMS

Three-tier architecture is an application software architecture that arranges the output into three parts or tiers that are:  the presentation tier, where the user interacts with the application; the application...

4 minutes read.

ER Diagram for University Database in DBMS

What is an ER diagram? ER diagram, short for Entity Relationship Diagram, also known as ERD, is a diagram that shows the relationships of a set of entities stored in a...

9 minutes read.

Levels of Abstraction in DBMS

Data abstraction is a way to hide unwanted or irrelevant information from the end user in DBMS. It helps in enhancing the security of data, and simplifies database design using...

4 minutes read.

Normalization in DBMS: 1NF, 2NF, 3NF, BCNF & 4NF with Examples

Normalization is a technique of organizing the data in the database. It is a systematic approach which is used to remove or reduce data redundancy in the tables and remove the...

7 minutes read.

Concurrent Execution of Transaction

In the transaction process, a system usually allows executing more than one transaction simultaneously. This process is called a concurrent execution. Advantages of concurrent execution of a transaction Decrease waiting time or...

4 minutes read.

Anomalies in Database Management System

Anomalies in a database management system (DBMS) are problems that can arise when the database is not designed or implemented correctly. These anomalies can affect the integrity and accuracy of...

3 minutes read.

Types of Data Abstraction in DBMS

What Is Data Abstraction? To ship an email, you want to know the address. But to send the email, you don't need to see where the email is physically stored. You...

6 minutes read.

Characteristics of DBMS

Introduction to DBMS: A database management system (DBMS) is a software application that is designed to manage and organize data stored in a database. It is responsible for storing, retrieving, and...

3 minutes read.

Er Diagram Symbols and Notations in DBMS

Entity Relationship Diagram Entity Relationship Diagrams, or ER Diagrams for short, are diagrams that show the relationships among entity sets that are stored in databases. Alternatively said, ER diagrams assist in...

6 minutes read.

Relational DBMS Concepts

What is RDBMS? RDBMS stands for Relational Database Management System.The relational database management system is a type of DBMS that stores information in the form of related tables and uses a...

3 minutes read.

B-Tree Insertion in DBMS

A B-tree is a special type of m-way tree, commonly used for disk access. A B-tree of order m can have at most m-1 keys and m descendants. B-trees are...

4 minutes read.

Secondary Key in DBMS

What are Keys? Keys in DBMS are the attributes or set of attributes that uniquely identify a row in a set of relations. A table (relation) can have a column or...

3 minutes read.

Components of DBMS

The database management system (DBMS) represents an essential tool for processing data within effectively structured structures. The database management system consists of important components that work together to maintain the...

6 minutes read.

What is Advanced Database Management System

Before diving into the Advance Database management system, we need to learn about the database management system and its usage. Database management system Database Management System or DBMS in short implies the...

3 minutes read.