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:05:59 -0800
Message-ID: <1140804359.681816.282310_at_t39g2000cwt.googlegroups.com>


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. Received on Fri Feb 24 2006 - 19:05:59 CET

Original text of this message