| [Relational Theory] | [Carol's HomePage] |
![]()
A candidate key uniquely identifies each row in a relational table.
If the minimal FD list/set is empty ("we don't have any FDs to use"), then the only way that we can guarantee that each row is unique is to have every attribute in the candidate key.
We are given the relation R (w, x, y , z) and the associated FD set {}.
The candidate key of R is {w, x, y , z}.
![]()
When the minimal FD list/set is empty, we often say that "there are no FDs amongst the attibutes in the relation" when we really mean that "there are no non-trivial FDs amongst the attibutes in the relation".
If {w, x, y , z} is the candidate key of R (w, x, y , z), then
w, x, y , z → w
w, x, y , z → x
w, x, y , z → y
w, x, y , z → z
![]()
I think each attribute will be a candidate key since each relation needs to have at least one candidate key.
We are given the relation R (w, x, y , z) and the associated FD set {}.
If each attribute will be a candidate key then the candidate keys will be: {w} {x} {y} {z}
If we have R (w, x, y , z) and {w} {x} {y} {z} are candidate keys, then
w → x
w → y
w → z
x → w
x → y
x → z
y → w
y → x
y → z
z → w
z → x
z → y
That is, if {w} {x} {y} {z} were valid candidate keys, then the minimal FD set would not be empty.
Given that the minimal FD set is empty, we know that {w} {x} {y} {z} are not valid candidate keys.
![]()
There is an important difference between "each attribute must be in the candidate key" and "each attribute must be a candidate key".
![]()
|
URL: http://leven.cis.utas.edu.au/users/cae/my_websites/theory/FindingCandidateKeys_NoFDs.shtml
Last modified: 24 October 2008 16:06:21 EST |