πŸŽ“ Computer Science & Engineering Portal

Master Engineering Disciplines with Structured Notes

Comprehensive academic lecture notes, exam-oriented unit summaries, laboratory manuals, and previous year question papers designed strictly for university students.

πŸ“‘

University Syllabi

AKTU & AICTE aligned semester guidelines.

πŸ“

Exam Question Papers

Previous 5 years solved university papers.

πŸ’‘

Lab Manuals & Viva

Practical codes with outputs & interview Qs.

Core Subjects & Units Hub

Click on any specific unit to immediately view its lecture notes below

Viewing All Lectures

Functional Dependency

Functional Dependency

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.

X   β†’   Y  

The left side of FD is known as a determinant, the right side of the production is known as a dependent.

For example:

Assume we have an employee table with attributes: Emp_Id, Emp_Name, Emp_Address.

Here Emp_Id attribute can uniquely identify the Emp_Name attribute of employee table because if we know the Emp_Id, we can tell that employee name associated with it.

Functional dependency can be written as:

Emp_Id β†’ Emp_Name   

We can say that Emp_Name is functionally dependent on Emp_Id.

Types of Functional dependency


DBMS Functional Dependency

1. Trivial functional dependency

  • A β†’ B has trivial functional dependency if B is a subset of A.
  • The following dependencies are also trivial like: A β†’ A, B β†’ B

Example:

Consider a table with two columns Employee_Id and Employee_Name.  
{Employee_id, Employee_Name}   β†’    Employee_Id is a trivial functional dependency as   
Employee_Id is a subset of {Employee_Id, Employee_Name}.  
Also, Employee_Id β†’ Employee_Id and Employee_Name   β†’    Employee_Name are trivial dependencies too.  

2. Non-trivial functional dependency

  • A β†’ B has a non-trivial functional dependency if B is not a subset of A.
  • When A intersection B is NULL, then A β†’ B is called as complete non-trivial.

Example:

ID   β†’    Name,  
Name   β†’    DOB 

 

Labels: ,

Discussion & Queries (<$I18NNumComments$>):

<$CommentPager$>
<$I18NAtCommentTimeWithPermalink$>, <$I18NCommentAuthorSaid$>

<$BlogCommentBody$>

<$BlogCommentDeleteIcon$>
<$CommentPager$>