Top Posts
Types of JDBC drivers
C++ Program to implements Constructor Overloading
C++ Program to implements Constructor
C++ Program to calculate the area using classes
C++ Class Program to Store and Display Employee...
Operator Overloading of Decrement — Operator
Postfix Increment ++ Operator Overloading
Prefix Increment ++ operator overloading with return type
Prefix ++ Increment Operator Overloading with no return...
JDBC Architecture
TECHARGE
  • HOME
  • BLOGS
  • TUTORIALS
    • ALL TUTORIALS
    • PROGRAMMING TUTORIALS
      • JAVA TUTORIALS
      • C++ TUTORIAL
      • C PROGRAMMING TUTORIALS
      • PYTHON TUTORIAL
      • KNOWLEDGE MANAGEMENT TUTORIALS
      • DATA STRUCTURE AND ALGORITHM TUTORIALS
      • PROGRAMMING EXAMPLES
        • CPP EXAMPLES
        • JAVA EXAMPLES
        • C++ GRAPHICS PROGRAM
    • PROJECTS
      • PYTHON PROJECTS
      • SWIFT PROJECT
    • PPROGRAMMING QUIZ
    • DBMS TUTORIALS
    • COMPUTER NETWORK TUTORIALS
    • COMPUTER NETWORK SECURITY TUTORIALS
    • E COMMERCE TUTORIALS 
    • AWS TUTORIAL
    • INTERNET OF THINGS
    • CHEATSHEET
  • MORE
    • JOBS AND INTERNSHIPS
    • INTERVIEW PREPARATION
    • TECH BOOK
    • TECH NEWS
    • INSTAGRAM GALLERY
    • UNIVERSITY PAPERS
    • MNC TWEETS
    • THINKECO INITIATIVES
    • WEB STORIES
    • CONTACT US
  • WRITE +
  • ABOUT US
Dbms Tutorials

Functional Dependency

by anupmaurya December 21, 2022
written by anupmaurya 0 comment

Table of Contents

  • Types of Functional Dependency
    • 1. Multivalued Functional Dependency in DBMS
    • 2. Trivial Functional Dependency in DBMS
    • 3. Non-Trivial Functional Dependency in DBMS
    • 4. Transitive Functional Dependency in DBMS

The functional dependency is a relationship that exists between two attributes. It typically exists between the primary key and non-key attribute within a table.

  • Introduced by E. F. Codd, it helps in preventing data redundancy and gets to know about bad designs.
  • Bad DBMS designs have plenty of disadvantages while querying, as well as make it impossible to implement any potential upgrades.
  • Functional Dependency is represented by  → (arrow sign).

To understand this concept ,Let us assume X is a relation with attributes A and B . Then the following function dependency between attributes can be represent by

A → B

Here, the left side of the arrow is identified as a Determinant, while the right side of the arrow is identified as a Dependent. “A” will always be the primary key attribute and “B” will be any dependent non-key attribute from the same table as the primary key. This shows A primary key attribute is functionally dependent on the B non-key attribute.

Types of Functional Dependency

Functional Dependencies can be classified in four types as follows:

1. Multivalued Functional Dependency in DBMS

Multivalued Functional Dependency takes place in the conditions when there is more than one independent attribute with multiple values in the same table.

The Multivalued Dependency case is a complete limitation between two sets of attributes in the relationship of Functional Dependency. It requires that certain row values can be present as a functional dependency connection. This can be represented as,

X → Y
X → Z
X → A,

Where X, Y, Z, A are attributes of the same table, X being the primary key and Y, Z, A is non- key attributes. Here Y, Z, A are functionally dependent on X, and not dependent on each other.

For better understanding, let us consider the below table,

Student_IDStudent_NameDeptDOB
S_001Sname01ComputerJan-01
S_002Sname02MathsMar-07
S_003Sname03EnglishSept-11
Example of Multivalued Functional Dependency

In this example, Student_Name, Dept & DOB are not dependent on each other but are dependent on Student_ID. In terms of Functional Dependency, Student_ID is the determinant, Student_Name, Dept, DOB are the dependents. Student_ID is the primary key here, while Student_Name, Dept, and DOB are non-key columns. Hence the dependence can be symbolized as,

Student_ID → Student_Name Student_ID → Dept Student_ID → DOB

2. Trivial Functional Dependency in DBMS

The Trivial Functional Dependency is a set of attributes or columns that are known a trivial if the one- key-dependent attribute is a subset of the determinant attribute, which is a primary key attribute.

This Trivial Functional Dependency scenario occurs when the primary key is formed by two columns, and one of which is functionally dependent on the combined set.

X → Y, where is a trivial functional dependency, if Y is a subset of X.

Let us consider the below table,

Student_IDStudent_NameDeptDOB
S_001Sname01ComputerJan-01
S_002Sname01MathsMar-07
S_003Sname03EnglishSept-11
Example of Trivial Functional Dependency

Here, if the primary key is a combination of the columns Student_ID and Student_Name, then the Student_Name column is in Trivial Functional Dependency relationship with the primary key set [Student_ID, Student_Name]. Any changes made in the Student_Name column will have its effects on the primary key set [Student_ID, Student_Name], as the Student_Name column is a subset of the primary key attribute set. For a Student ID, S_001, the primary key combination will be [S_001, Sname01]. If a change to the name is made as Sname001, then the primary key combination will change as [S_001, Sname001], as the Student_Name column is a subset of the primary key.

3. Non-Trivial Functional Dependency in DBMS

A Non Trivial Functional Dependency is a normal functional dependency, where the non-key attribute is functionally dependent on a primary key attribute, without the occurrence of trivial functional dependency.

X → Y, where is a non-trivial functional dependency, if and only if Y is not a subset of X.

Let us consider the below table,

Student_IDStudent_NameDeptDOB
S_001Sname01ComputerJan-01
S_002Sname02MathsMar-07
S_003Sname03EnglishSept-11
Example of Trivial Functional Dependency

4. Transitive Functional Dependency in DBMS

A Transitive Functional Dependency is a type of functional dependency which happens when the non- key attribute is indirectly formed by its functional dependencies on the primary key attributes. Either the value or the known factors can be the reason for this type of Functional Dependency occurrence. The Transitive Functional Dependency can only occur in a relation of three or more non-key attributes that are functionally dependent on the primary key attribute.

Let us consider the below table to understand this,

Student_IDStudent_NameDeptDOB
S_0101_CSname01Computer_C01-01-1999
T_0307_MTname02Maths_M03-07-1998
U_0711_EUname03English_E07-11-1997
Example of Transitive Functional Dependency

In this table, the Student_ID column is the primary key. The values in the Student_ID column are formed by the combination of the first letter from the Student_Name column, last code from the Dept column and date & month from the DOB column. If any change is made in any of these columns will reflect changes in the primary key column, that is, the Student_ID column. Any new record inserted in this table will also have a Student_ID value formed from the combination of the other three non-key columns.

Functional Dependency
Share 7 FacebookTwitterLinkedinRedditWhatsappTelegramEmail
anupmaurya

Hey there, My name is Anup Maurya. I was born with love with programming and worked with TCS. One of best global (IT) services and consulting company as System Administrator . I also love graphics designing. It's my pleasure to have you here.

previous post
OOPs Concepts in Java
next post
Difference Between Applet and Servlet in Java

You may also like

Normalization in DBMS

Boyce Codd normal form (BCNF)

Third Normal form (3NF)

Second Normal Form (2NF)

SQL Tutorial

Entity Relationship Diagram – ER Diagram in DBMS

Relational DBMS

Difference between DBMS and File System

Database Models in DBMS

Relational Model Concepts

DBMS TUTORIAL

  • DBMS Introduction
  • Relational DBMS
  • DBMS Architecture and Data Abstraction
  • Data Abstraction
  • Different types of Database Users
  • Characteristics of DBMS
  • Types of database utilities and its functions
  • DBMS Functions
  • Relational Model Concepts
  • Difference between DBMS and File System
  • Entity Relationship Diagram – ER Diagram in DBMS
  • Functional Dependency
  • Normalization in DBMS
  • Closure in DBMS | How to Find Closure
  • Second Normal Form (2NF)
  • Third Normal form (3NF)
  • Boyce Codd normal form (BCNF)
  • Transaction in DBMS
  • Transaction property
  • States of Transactions
  • Indexing in DBMS
  • Hashing in DBMS
  • Schedule in DBMS
  • Concurrency Control in DBMS
  • Lock Based Protocols in DBMS
  • Serializability in DBMS
  • Indexed sequential access method (ISAM)
  • DBMS Interview Questions

Words from Readers

Its a very pleasant environment to be on a very interactive learning platform which helps me to enhance my skill set to move forward in an IT marathon.

–Akash Raj

SQL Tutorial

  • SQL Introduction
  • SQL Datatypes
  • SQL Commands

Recent Posts

  • Types of JDBC drivers

    December 28, 2022
  • C++ Program to implements Constructor Overloading

    December 27, 2022
  • C++ Program to implements Constructor

    December 27, 2022

EDUCATIONAL

  • Difference between Google Cloud Platform, AWS and Azure

  • Google Apps You Should Be Using in 2022

  • Top Sites From Where You Can Learn

  • PyScript: Python in the Browser

  • Best Fake Email Generators (Free Temporary Email Address)

  • How to Find Out Who Owns a Domain Name

  • Mobile phone brands by country of origin

  • How to start a new YouTube Channel in 2022

  • Best way to use google search you won’t believe exist

  • 10 mostly asked questions related to WhatsApp

CHEATSHEET

  • Git and Github 2022 Cheat Sheet

  • ReactJs Cheatsheet

  • Linux Commands Cheat Sheet

  • C Programming language Cheatsheet

  • Scala Cheatsheet

  • MySQL Cheatsheet

  • Javascript Cheatsheet

PROJECTS

  • Print emojis using python without any module

  • Country Date and Time using Python

  • Covid-19 Tracker Application Using Python

  • Python | GUI Calendar using Tkinter

  • Python: Shutdown Computer with Voice

  • Python GUI Calculator using Tkinter

  • Convert an Image to ASCII art using Python

  • Python YouTube Downloader with Pytube

  • Tic-Tac-Toe using Python

  • Draw Indian Flag using Python

  • Drawing Pikachu with the Python turtle library

  • Word Dictionary using Tkinter

TECH NEWS

  • 5+ Best Humanoid Robots In The World

  • Reliance Jio launches streaming platform JioGamesWatch

  • Microsoft Teams down for thousands of users

  • Carbon: Google programming language as a C++ successor

JOBS AND INTERNSHIPS

  • Accenture Off Campus Hiring Drive | Associate Job | Program Project Management | 2019-2022 Batch| Apply Now

    September 1, 2022

@2019-21 - All Right Reserved. Designed and Developed by Techarge

TECHARGE
  • HOME
  • BLOGS
  • TUTORIALS
    • ALL TUTORIALS
    • PROGRAMMING TUTORIALS
      • JAVA TUTORIALS
      • C++ TUTORIAL
      • C PROGRAMMING TUTORIALS
      • PYTHON TUTORIAL
      • KNOWLEDGE MANAGEMENT TUTORIALS
      • DATA STRUCTURE AND ALGORITHM TUTORIALS
      • PROGRAMMING EXAMPLES
        • CPP EXAMPLES
        • JAVA EXAMPLES
        • C++ GRAPHICS PROGRAM
    • PROJECTS
      • PYTHON PROJECTS
      • SWIFT PROJECT
    • PPROGRAMMING QUIZ
    • DBMS TUTORIALS
    • COMPUTER NETWORK TUTORIALS
    • COMPUTER NETWORK SECURITY TUTORIALS
    • E COMMERCE TUTORIALS 
    • AWS TUTORIAL
    • INTERNET OF THINGS
    • CHEATSHEET
  • MORE
    • JOBS AND INTERNSHIPS
    • INTERVIEW PREPARATION
    • TECH BOOK
    • TECH NEWS
    • INSTAGRAM GALLERY
    • UNIVERSITY PAPERS
    • MNC TWEETS
    • THINKECO INITIATIVES
    • WEB STORIES
    • CONTACT US
  • WRITE +
  • ABOUT US