The wonderful world of keys
Date: 24 Jan 2007 08:59:58 -0800
Message-ID: <1169657998.788169.129210_at_m58g2000cwm.googlegroups.com>
Just a quickie.
I have always considered keys in terms of functional
dependencies/determinants, and was trying to reword it in the
terminology of logic. I liked the idea of describing a key using "if
then" to explain why there cannot be any other consequent values, and
so why (logically) the column has to be a unique, because I could then
analogise to java students (who always have trouble with this sort of
thing) why its nonsensical to have duplicate key values with a bit of
code like:
switch (empID)
{
case 1: salary = 20000; break;
}
But on considering the possibility of a relation having a superkey which includes all its attributes, and hence where there is no material implication at all in its describing predicate, I ran into a bit of a mental block. Perhaps my analogy is awry, I'm not certain, as I seem then to be saying in this case that there is nothing on the other side of the -> implication, other than a 'true'. Perhaps this is ok? Thoughts welcome. Received on Wed Jan 24 2007 - 17:59:58 CET