954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

What is the diffrence between Key and Superkey how can we understand ? help me

What is the diffrence between Key and Superkey how can we understand ? help me please

mertucci
Newbie Poster
16 posts since May 2008
Reputation Points: 10
Solved Threads: 0
 

hi mertucci,

are in doing data modelling?
Superkey is any subset of attributes that uniquely identifies the tuples of a relation. This subset need not be minimal, that is, one can remove some attributes from it and it is still uniquely identifying. If all redundant attributes are removed you get a subset what is called primary key. A key (better: primary key) is the minimal subset of attributes that uniquely identifies the tuples of a relation, that is, you can't remove further attributes from this subset without losing the property of unique Identification. Therefore, the super superkey (like superman) is always the set of all attributes of a relation.

krs,
tesu

tesuji
Master Poster
721 posts since Apr 2008
Reputation Points: 158
Solved Threads: 98
 

thanks bro

mertucci
Newbie Poster
16 posts since May 2008
Reputation Points: 10
Solved Threads: 0
 
...If all redundant attributes are removed you get a subset what is called primary key...


I have to make an extension:
Sometimes there are more than one superkey of a relation. In such case also all redundant attributes have to be removed and the remaining subsets of attributes are then called CANDIDATE KEYS. Now one can freely select ONE of these candidate keys to identify the relation's tuples. In such case, this selected subset is called PRIMARY KEY.

krs,
tesu

tesuji
Master Poster
721 posts since Apr 2008
Reputation Points: 158
Solved Threads: 98
 

Can i know what is the difference between superkey and primary key?
what is actually candidatekey?

mathewmoozh
Newbie Poster
17 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

a key is a superkey K such that removal of any attribute from K results in a set of attributes that is not a superkey (does not possess the superkey uniqueness property)

abdulhkeem
Newbie Poster
1 post since May 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You