0000
Functional Dependencies Concept:
Let R be the relation X, Y are non – empty sets of attributes over R and are any tuple of R.
.png)
Here X and Y may single or multiple attributes like
.png)
Here X functionally determined Y or Y is functionally determined by X.
.png)
.png)
| 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
.png)
.png)
.png)
.png)
So,
.png)
Case 2:
R
.png)
.png)
So,
.png)
Case 3:
R
.png)
.png)
So,
.png)
Case 4:
R
.png)
.png)
So,
.png)
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.
.png)
So, Case 3 never possible
Student
.png)
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
.png)
.png)
Now check the following FDs
1. Cid → Cname: (case 3 not occurred) So, it is possible.
.png)
.png)
2. Sname → Cid
.png)
.png)
Here case 3 occurred. So, it is false.
3. Sname → Cname
.png)
.png)
Case 3 occurred. So, it is false.
4. Sname → Sid
.png)
.png)
Case 3 occurred. So, it is false.
5. Cid → Sid
.png)
.png)
Case 3 occurred. So, it is false.
6. Cid → Sname
.png)
.png)
Case 3 occurred. So, it is false.
7. Cname → Cid
.png)
.png)
It is true, so, case 3 not possible.