×

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., Y ? 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., Y ? 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

Disavantages of RDBMS

RDBMS offers many features when handling the data, but it also has certain limitations that can be overcome by choosing an alternative data model. The limitations of the Relational Data...

3 minutes read.

Foreign key in DBMS

Foreign key in DBMS: The Foreign key is a field or the set of fields in the relational database table, which points to the existing field in another table. It...

2 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.

View Serializability in DBMS

View Serializability It is a type of serializability that can be used to check whether the given schedule is view serializable or not. A schedule called as a view serializable if it is view...

4 minutes read.

Red-Black Tree Visualization in DBMS

Introduction to Red Black Tree A red-black tree is a self-balanced binary search tree with an extra bit per node, usually read as a color (red or black). The tree is...

4 minutes read.

Components of Relational Database Management System

A relational database management system compromises various component. Tables, records, attributes, instances, schemas and keys together form a relational database. In this page, we will discuss each component of RDBMS in...

4 minutes read.

Database for library management system

The database can be considered the container where the data or information can be stored electronically in a computer system. Most mobile applications and websites run our day-to-day activities by...

5 minutes read.

DBMS Examples

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...

4 minutes read.

Three Schema Architecture of DBMS

The three schema architecture describes how the data is represented or viewed by the user in the database. This architecture is also known as three-level architecture and is sometimes called...

3 minutes read.

Relational Algebra in DBMS

Relational Algebra is a widely used procedural query language, which takes instances of one or more relation as an input and generates a new relation as an output. It uses a different...

6 minutes read.

Inference Rules

Armstrong’s axioms are the complete set of basic inference rules used to infer all the functional dependencies on the relational database. An inference rule is a type of assertion that a user can...

2 minutes read.

ER Diagram for Student Management System in DBMS

Entity Relationship diagrams 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.

Levels of Locking in DBMS

There are several levels of locks that can control the access to the elements stored at various levels in the Database. There can be multiple levels of the locks. These...

6 minutes read.

DBMS Languages

User can access, update, delete, and store data or information in the database using database languages. The following are the databases languages in the database management system: Data Definition Language Data Manipulation...

3 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.

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.

Disadvantages of DBMS

Disadvantages of DBMS With the vast list of advantages, there are some following disadvantages or limitations of the database management system. 1. High Cost The high cost of software and hardware is the...

2 minutes read.

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.

ER Diagram of Company Database 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...

3 minutes read.

Fragmentation in Distributed DBMS

Fragmentation is a course of isolating the entire or full information base into different sub tables or sub relations with the goal that information can be put away in various...

4 minutes read.