Seen the answers on the mentioned URLs. Generally while designing database, such keys needs to be identified and the best practice is go through the ER diagrams which are irrespective of any database. Here I am giving the theoratical explanations to these keys which are considered in the context of entity set (which eventually becomes table in database implementation)
1. Super key : set of one or more attributes (eventually converted to columns in database table) of an entity set which uniquely determine each entity (eventually becoming the row in the table). These are also temed as alternate keys
EmpID, EmailID, SSN, Salutation + FirstName+LastName+Middle Name, FirstName+LastName+Middle Name + Date of Birth in Employee entity set
2. Candidate Key: it is mimimal Super key
e.g. SSN in Employee entity set, accountnumber in Account entity
3. Primary key: One of the candiate keys selected to represent the entity set
Composite key is any of the above keys having more than one attribute.
Hope this helps.Jeetmcts, if this helps please login to Mark As Answer. | Alert Moderator