Bob Bob - 27 days ago 8
SQL Question

Difference between super key and composite key

I need to understand the difference between super key and composite key. The examples I found made more confused. Can you please simply clarify what is the difference? Thanks

Answer

A super key uniquely identifies a row. It could be made up of one column or many. A composite key is a key made of more than one column.

If a Super Key is made of more than one column it is also a composite.

If a composite key uniquely identifies a row it is also a Super key.

I don't see the name 'Super key' used too much: it's usually just called a 'Unique key'.