Difference between super key and composite key

后端 未结 4 1541
清酒与你
清酒与你 2021-02-06 08:02

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

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-06 08:23

    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'.

提交回复
热议问题