Functional Dependencies: DBMS Class Notes

Updated: Aug 18

Mobiprep has created last-minute notes for all topics of Functional Dependencies to help you with the revision of concepts for your university examinations. So let’s get started with the lecture notes on Functional Dependencies.

  1. DBMS

  2. Data Modelling

  3. Database Architecture

  4. Relational Model

  5. Backup and Recovery

  6. Functional Dependencies

  7. Normalization

  8. Deadlock

  9. Transaction and Concurrency Control

  10. Files and Storage

  11. Relational Algebra

  12. Entity Relationship Model

  13. Indexing

Our team has curated a list of the most important questions asked in universities such as DU, DTU, VIT, SRM, IP, Pune University, Manipal University, and many more. The questions are created from the previous year's question papers of colleges and universities.

  1. Define Functional Dependency in Relational Model.

  2. Define Functional dependency set.

  3. What are the types of Functional Dependencies?

  4. What are the different properties of Functional Dependency?

  5. Define Attribute Closure with an example.

  6. Define Canonical Cover with an example.

  7. Explain Lossless Join Decomposition.

  8. What do you mean by Extraneous Attributes?

  9. What is a use of Attribute Closure?

  10. What is Trivial Dependency?

  11. What is the use of Functional Dependencies?


Functional Dependencies


Question 1 - Define Functional Dependency in Relational Model.

Answer - Functional dependency defines the relationship of one attribute to the other in a database table. A functional dependency of a relation is denoted by an arrow 🡪.

If the attribute A is dependent on attribute B, it is denoted by A🡪B. A🡪B indicates that tuples having the same value of attribute A also should have the same value of attribute Example:

SID

S Name

Subject

1

Ranjit

Maths

2

Varun

Science

3

Ranjit

History

In the above example, SID🡪SName is a functional dependency, because SName is dependent on SID.

 

Question 2- Define Functional dependency set.

Answer - A functional dependency set of a relation is the set of all functional dependencies in that relation.

Example:


Roll No.

Name

Age

Phone

Country

1

Leonard

19

1234567890

England

2

Sheldon

22

0987654331

Italy

The functional dependency set of the above relation is

{ Roll_No.🡪Name, Roll_No🡪Phone, Roll_No🡪Country, Name🡪Age}

 

Question 3 - What are the types of Functional Dependencies?

  1. Trivial Functional Dependency: A🡪B is said to be a trivial functional dependency if B is the subset of A and A∩B is not NULL. Such a functional dependency is always valid. An attribute determining itself (A🡪A) is also a trivial functional dependency.

  2. Non-trivial Functional Dependency: A🡪B is said to be a non-trivial functional dependency if B is not a subset of A and A∩B is NULL. Such a functional dependency may be valid or invalid.

 

Question 4 - What are the different properties of Functional Dependency?

Answer - Armstrong’s axioms are the set of rules which define the properties of a functional dependency.

  1. Reflexivity - If Y is subset of X, then X🡪 Y

  2. Augmentation - If X 🡪 Y, then XZ 🡪YZ

  3. Transitive - If X 🡪Y and Y 🡪Z, then X🡪Z

  4. Union - If X🡪Y and X🡪Z, then X🡪YZ

  5. Decomposition - If X🡪YZ, then X🡪Y and X🡪Z

  6. Pseudo Transitivity - If X🡪Y and WY🡪Z, then WX🡪Z

  7. Composition - if X🡪Y and Z🡪W, then XZ🡪YW

 

Question 5 - Define Attribute Closure with an example.

Answer - The attribute closure of a set of attributes is defined as the set of all attributes which can be functionally determined from it. Attribute closure of the relation A is denoted by {A}+.

Steps to find attribute closure of a relation:

  • Add elements of an attribute set to the result set.

  • Recursively add elements to the result set which can be functionally determined from the elements of the result set.

 

Question 6 - Define Canonical Cover with an example.

Answer - Canonical cover Fc of a set of functional dependencies F is a simplified or irreducible set of FDs that has the same closure as that of the original set F. Fc logically implies all dependencies in F. A functional dependency in the canonical or minimal cover must not have extraneous attributes. Each left side of an FD in Fc is unique. i.e. there are no 2 dependencies A🡪B and C🡪D such that A🡪C

Example

Roll No.

Name

Age

Phone

Country

1

Leonard

19

1234567890

England

2

Sheldon

22

0987654331

Italy

The closure of the attribute Roll_No. in the above table is given below:

(Roll_No)+ = {Roll_No., Name, Phone, Country, Age}

 

Question 7 - Explain Lossless Join Decomposition.

Answer - Lossless join decomposition is used to remove redundancy from the relation safely. When a relation is decomposed into two or more relations (R1, R2, etc.,) such that the natural join of the relations will give back the original relation, it is called lossless join decomposition.

Consider that a relation R is decomposed into three relations R1, R2, and R3. This decomposition is lossless if the union of the attributes R1, R2, and R3 is equal to the attributes of R, and the intersection of the attributes of R1, R2, and R3 is NULL.

 

Question 8 - What do you mean by Extraneous Attributes?

Answer - After removing an attribute of functional dependency, if there is no change in the attribute closure of the set of FDs, then the removed attribute is called an extraneous attribute. A canonical cover must not contain extraneous attributes.

 

Question 9 - What is a use of Attribute Closure?

  1. Attribute closure helps in finding all the functional dependencies of a relation.

  2. It is used to find the candidate keys of a relation.

 

Question 10 - What is Trivial Dependency?

Answer - A🡪B is said to be a trivial functional dependency if B is the subset of A and A∩B is not NULL. Such a functional dependency is always valid. An attribute determining itself (A🡪A) is also a trivial functional dependency.

 

Question 11 - What is the use of Functional Dependencies?

Answer - The following are the uses of functional dependencies:

  1. Functional dependencies help in the design of good database models.

  2. Functional dependencies are useful in removing the redundancies from the relational database without any loss of data.

  3. It reduces the possibility of an update anomaly.

  4. It promotes data integrity and data consistency.














1 view0 comments

Recent Posts

See All