Re: The wonderful world of keys
Date: Wed, 24 Jan 2007 21:15:13 GMT
Message-ID: <2007012507144831729-usenet_at_thurboncom>
On 2007-01-25 02:59:58 +1000, "JOG" <jog_at_cs.nott.ac.uk> said:
> Just a quickie.
> 
> Would one be correct in saying that "a key represents the set of
> antecedents of the material implication in a relation's predicate?".
> 
> 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;
>   case 1: salary = 30000; 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.
I'm not sure if you can rescue it, but be aware that
a ->
is often used as a shorthand for
a -> true
which is equivalent to
~a v true
which is equivalent to
~a.
So, and now I begin to speculate, in the case where the relation 
consists only of a superkey,
 
superkey ->
 
is almost certainly not what you want. But, as Neil from The Young Ones 
once said "Most metaphors don't bear up under close examination". So 
even if it only makes sense when there are some non superkey 
attributes, that's fine. In fact, in the superkey-only situation, the 
bodies of your Java case statement would be empty anyway!
Cheers,
Joe
Received on Wed Jan 24 2007 - 22:15:13 CET
