But the reverse is not true, i.e. if (X ⊇ Y) then X → Y true but if X → Y is true then (X ⊇ Y) or X ⊉ Y any case occurred.
Definition of Trivial FD: If a functional dependency (FD) X → Y holds, where Y is a subset of X, then it is called a trivial FD.
Example:
1. Sid ⊇ Sid so, Sid → Sid
2. SidSname ⊇ Sid so, SidSname → Sid
3. SidSname ⊇ Sname so, SidSname → Sname
4. CidSname ⊇ Snameso, CidSname → Sname
Example
AB → A
R
A | B | A |
1 | 1 | 1 |
2 | 1 | 2 |
1 | 3 | 1 |
In that case, AB → A is possible because case 3 never possible.
Non-Trivial Functional Dependency:
We can define Non-trivial functional dependency in two ways:
1. X ⋂ Y = ɸ
OR
2. X ⊉ Y
Example for condition 1:
Sid → Cname - There is no common attribute between Sid and Cname because both are single unique attribute so, it satisfies condition 1 Sid ⋂ Cname = ɸ
So, if Sid → Cname is Functional Dependency and Sid ⋂ Cname = ɸ then it is non-trivial F.D.
See another case:
SidSname → Sname but in this case SidSname ⋂ Sname ≠ ɸ
So, it is Trivial FD but not non-trivial FD.
X ⊉ Y: Condition 2
Condition 2, X ⊅ Y it means if X → Y is FD and X ⊇ Y then it is trivial and if X → Y is FD but X ⊉ Y then it is non-trivial FD.
Basically, X → Y is FD, and X ⊇ Y id trivial and except trivial all other FDs are non-trivial.
Non-trivial: If an FD X → Y holds, where Y is not a subset of X, then it is called a non-trivial FD.
Completely non-trivial: If an FD X → Y holds, where X ⋂ Y = ɸ, it is said to be a completely non-trivial FD.
Q. Identify all non-trivial FDs
A | B | C |
1 | 4 | 2 |
2 | 5 | 2 |
3 | 4 | 2 |
3 | 5 | 2 |