2

Functional Dependency & its Properties in DBMS

 1 year ago
source link: https://www.geeksforgeeks.org/videos/functional-dependency-its-properties-in-dbms/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Functional Dependency & its Properties in DBMS

Functional Dependency & its Properties in DBMS
Hello everyone, welcome to gigs for week's lectures.
  • 30 Views
  • 19/08/2022

In this video, we will be covering the functional dependencies & its properties in DBMS.

Let us first understand, what is functional dependencies
In any relation, a functional dependency is said to be hold true If two tuples having the same value of one attribute also have the same value for another attribute. 

Functional Dependencies are domain dependent for a particular relation. A functional dependency set is a set of all the existing functional dependencies of a given relation. 

Set of all the attributes which are functionally reachable (determined) from attribute A is known as the closure of attribute A. 
It can be denoted by A+ 

How to find attribute closure? 

Step:1 Find all the attributes determine by one attribute 
Step:2 Recursively find all the attributes set of the attributes determine by step 1 and add it to the result set 

Example: In a schema R(A,B,C,D,E) FD set is given as follows: 
{A → B, A → C, CD → E, B → D, E → A} 

Which of the following functional dependencies is implied by the above set? 
A. CD → AC 
B. BD → CD 
C. BC → CD 
D. AC → BC 

Solution: 
Option A holds true because CD determines the E, E determines A, and Hence this FD holds. 
Option B does not hold as B determines D and D determines no other attributes, so C cannot be determined. 
Option C holds true as B determines D. 
Option D holds true as A determines B. 

How to identify Candidate key or SuperKey? 

Step:1 Find attribute closure of the attributes/combination of attributes which contains all the attributes of a relation and make them as super key 
Step:2 If no subset of this attribute set can functionally determine all attributes of the relation, the set will be candidate key as well. 

Prime attributes: The attributes which is part of any of the candidate keys of a given relation then they are called as prime attributes. 
Non-Prime attributes: Attributes which are not prime attributes are known as non-prime attributes. 

Functional dependency:
https://www.geeksforgeeks.org/functional-dependency-and-attribute-closure/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK