CREATE OWN LIBRARY

Functional Dependencies 

 

Functional Dependencies Concept:

Let R be the relation X, Y are non – empty sets of attributes over R and t1, t2 are any tuple of R.

 

 

Here X and Y may single or multiple attributes like

 

 

Here functionally determined Y or Y is functionally determined by X.

 

 

 

p

q

p ⇒ q

Case 1

0

0

1

Case 2

0

1

1

Case 3

1

0

0

Case 4

1

1

1

 

Case 1:

R

 

So, 

 

Case 2:

R

 

So, 

 

Case 3:

R

 

So, 

 

Case 4:

R

 

So, 


 

Note: All cases are true except case 3, so to check functional dependency (F.Ds) we only check case 3 which tells us it is F.Ds or not.

 

We can say:

(Any key) Any attributes

The reason is key is always unique never duplicate.

 

 

So, Case 3 never possible

 

Student

 

 

As we know Sid is a key attribute so, Sid → (Any attribute) 

So, Case 3 never possible

 

How many F.Ds we can get from Sid:

Key Attribute → Any attribute

 

 

 

Now check the following FDs

1. Cid → Cname: (case 3 not occurred) So, it is possible.

 

 

2. Sname → Cid

 

Here case 3 occurred. So, it is false.

 

3. Sname  → Cname

 

Case 3 occurred. So, it is false.

 

4. Sname → Sid

 

Case 3 occurred. So, it is false.

 

5. Cid → Sid

 

Case 3 occurred. So, it is false.

 

6. Cid → Sname

 

Case 3 occurred. So, it is false.

 

7. Cname → Cid

 

It is true, so, case 3 not possible.