What is the difference between a superkey and a composite key?
Solution
The accepted answer is not entirely accurate...
A superkey is any set of columns that, combined together, are unique. There are typically many superkeys per table and same column may be shared by many superkeys. They are not very useful by themselves, but are more of a mental tool for identifying candidate keys (see below).
A candidate key is a minimal superkey - if any column is removed it would no longer be unique. There are typically significantly fewer candidate keys than superkeys.
A key is just a synonym for a candidate key.
A composite1 key is a key that has more than one column. In other words, it's a minimal superkey that has multiple columns.
Few more points:
Every key is unique, so calling it "unique key" is redundant. Just "key" is enough.
At the DBMS level, a key is enforced through a PRIMARY KEY or UNIQUE2 constraint.
An index is usually present underneath the key (PRIMARY KEY or UNIQUE constraint), for performance reasons. But despite often going together, key and index are separate concepts: key is a logical concept (changes the meaning of data) and index is a physical concept (doesn't change the meaning of data, just performance).