What are Compound Key and SuperKey?

I already went through their respective Wikipedia page Component Key and Super Key . I really could not understand this concept. I am looking for a very simple and simple explanation given below in the answer (not necessarily one liner, but with examples).

+2
source share
3 answers

A superclass is any combination of attributes that must be unique to all possible values ​​of a relation.

The candidate key is a minimal superkey. Minimal means that if any attribute of the superclap has been deleted, then the remaining set of attributes will no longer be a superkey, i.e. The uniqueness property will be lost. In other words, each superkey consists of a candidate key plus zero or more other attributes.

A component key, also called a composite key, is a candidate key that has more than one attribute.

+2
source

A super-key (called primary or unique in the sql server) uniquely identifies the row in the table. those. it returns only one row. A component key does the same, but consists of several fields.

, FirstName, -, , .

+1

A component key is a key that has 2 or more attributes, and a superclass is a combination of columns that uniquely identify any row in the RDBMS table.

+1
source

All Articles