Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: No exceptions?

Re: No exceptions?

From: Jon Heggland <jon.heggland_at_idi.ntnu.no>
Date: Sat, 01 Jul 2006 19:35:58 +0200
Message-ID: <e86btn$id8$1@orkan.itea.ntnu.no>


J M Davitt wrote:
> I think I got it. Am I correct in understanding that JH said,
> "If an empty candidate key is declared, any other keys are
> superkeys?"

That's what I mean, yes.

> I appreciate JH's preference for the terms key and auperkey and
> think the idea has some merit - everyone seems to understand the
> uniqueness of key values and his terminology neatly distinguishes
> keys which are and are not irreducible.

I believe this is standard terminology. I may misremember or be confused; I'll check when I get back to my books on Monday.

> I'm still pondering...
>
> Using JH's definitions: if an empty key is declared, any other keys
> are superkeys. This would be the case if one presumes that the "no
> attribute" is also a component of all those superkeys, right?

That makes little sense. A key is a set of attributes; "no attribute" (whatever kind of thing that may be) is never a member of such a set. Think sets and subsets!

> And
> I don't understand why that must be so. Once a key without
> attributes is declared, the relation value can hold no more than one
> tuple - but I don't see why every other attribute cannot also be a
> key.

(An attribute is never a key; a key is a set of attributes, even if that set has cardinality one.) A set of attributes that satisfies the uniqueness property is a superkey; it is also a key if no proper subset of it also is a superkey. In a relation where the empty set is key, any non-empty set (including singleton sets) cannot be a key, because there is always a proper subset of it (namely the empty set) that is also a superkey.

> On other words, I don't understand why "[i]t follows that such a
> relvar can have no other keys."

It can, however, have other superkeys. In fact, any combination of any number of attributes is a superkey.

-- 
Jon
Received on Sat Jul 01 2006 - 12:35:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US