Difference between Super Key and Candidate key

Computer EngineeringComputer NetworkMCA

Both Super Key and Candidate key are used to get records from tables. These keys are also used to create relationship between tables. Super Key and Candidate key both are used to identify records uniquely in a table. Both keys can have null values.

Following are the important differences between Super Key and Candidate key.

Sr. No.KeySuper KeyCandidate key
1DefinitionSuper Key is used to identify all the records in a relation.Candidate key is a subset of Super Key.
2UseAll super keys can't be candidate keys.All candidate keys are super keys.
3SelectionSuper keys are combined together to create a candidate key.Candidate keys are combined together to create a primary key.
4Count WiseSuper keys are more than Candidate keys.Candidate keys are less than Super Keys.
raja
Published on 27-Nov-2019 11:54:14
Advertisements