Re: What are the differences between the terms, CANDIDATE KEY, PRIMARY KEY, SUPER KEY, COMPOSITE KEY?

From: Mikito Harakiri <mikharakiri_nospaum_at_yahoo.com>
Date: 24 Feb 2006 10:13:26 -0800
Message-ID: <1140804806.526278.287450_at_j33g2000cwa.googlegroups.com>


Mikito Harakiri wrote:
> Abhishek wrote:
> > Hi,
> > Can anybody tell me the differences between the above mentioned terms?
> > Also please tell me if one can be the other and vice versa..please
> > elaborate with the helpof a table if possible. Also please tellme if
> > the below statement by me is correct..
> > a) Any attribute or a collection of attributes which uniquely
> > identifies the tuples in a relation is called a canditate key.this
> > candidate key thus can contain a single attribute or a collection of
> > attributes.
> > b) one of the attributes is chosen by the DBMS to identify the tuples
> > uniquely and this attribute is called the primary key.
> > c) A primarykey is a candidate key.all candidate keys cannot be a
> > primary key.
> > Now,,,what is the superkey?
>
> There is no formal distinction between them. Therefore, let's speak of
> unique key or just a key. Formally, a key is a functional dependence
> from a set of attributes to the whole relation header.

To clarify, I don't really understand why some property totally unrelated to uniquness has to be a part of key name. For example, what irreducibility of the number of attributes has to do with uniqueness? Or attribute participation in referential integrity constraint? Received on Fri Feb 24 2006 - 19:13:26 CET

Original text of this message