Functional Dependency

Functional Dependency

Functional Dependency

  • Functional Dependency (FD) is a relationship that exists between attributes.
  • It exists between primary key & non-key attribute in a table

X -> Y

LHS is called Determinant

RHS is called Dependent

Example Emp_ID -> Emp_Address

Here Emp_Address is functional dependent on Emp_ID

  • FD helps to maintain the quality of data in DB
  • It help to find difference between good & bad design of database

Types of Functional Dependency

  • Trivial Functional Dependency (TFD)
  • Non-trivial Functional Dependency (FD)

1) Trivial FD

i) A->B has trivial functional dependency if B is a subset of A

ii) A->A & B->B is also Trivial Functional Dependency (TFD)

2) Non-Trivial FD

If B is not subset of A

When A intersection B(A n B) is null, then A->B is called as complete non-trivial functional dependency

Example

ID -> Name

Name -> Address/DOB

UGC NET EXAM Questions

Q1) Consider a relation R(A,B,C,D,E) with the following functional dependencies

ABC -> DE and

D -> AB

Solution

The number of superkeys of R is 10

Superkey is a combination of columns that uniquely identifies any row within RDBMS table

Q2) Suppose relation R(A,B,C,D,E) has the following functional dependencies

A->B

B->C

BC->A

A->D

E->A

D->E

Which of the following is not a key?

Solution: B,C

Here the keys are not formed by B & C

Q3) If E is a set of Functional Dependency then closure of E is denoted by?

Solution: E+

Q4) If A->B, A->C then which of the following is true?

Solution

  1. A->BC
  2. A->B
  3. A->C
  4. All are true

Q5) If B is an attribute & A->B then B is said to be ____________________________ by A.

Solution: Functionally Determined

Leave a Reply 0

Your email address will not be published. Required fields are marked *


Exit mobile version