Re: The wonderful world of keys

From: JOG <jog_at_cs.nott.ac.uk>
Date: 24 Jan 2007 18:19:04 -0800
Message-ID: <1169691544.908418.46310_at_s48g2000cws.googlegroups.com>


On Jan 24, 9:15 pm, Joe Thurbon <use..._at_thurbon.com> wrote:
> On 2007-01-25 02:59:58 +1000, "JOG" <j..._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.

I would have thought '~a v true' was equivalent to 'true'?

>
> 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".

Heavy.

> 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!

Perhaps traditional db thinking is back to front; perhaps if a proposition has no material implication instead of a full-superkey it /has no key at all/ - it is an unnecessary concept for such a relation, given the fact that if I attempted to duplicate this 'key' then I would be duplicating the whole tuple, which is already forbidden given the tuple is a set element. But then perhaps I just drink too much coffee.

>
> Cheers,
> Joe
Received on Thu Jan 25 2007 - 03:19:04 CET

Original text of this message