question

minijebu avatar image
minijebu asked

How do a Super key differ from a Compound key?

Both of them seems to be the combination of attributes.How to identify the difference?
key
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Magnus Ahlkvist avatar image
Magnus Ahlkvist answered
A super key is a set of attributes which can uniquely identify a row. A super key can consist of a single attribute, if that single attribute uniquely identifies a row. A compound key is a key containing more than one attribute. You want to use the minimal super key as the primary key for a table.
3 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks for your reply. so,can i call a super key with 2 attributes as a compound key?
0 Likes 0 ·
Any key having more than one attribute is a compound key. Any key which uniquely identifies a row is a super key. If a super key has two attributes, it is a compund super key :)
0 Likes 0 ·
Thanks! This helps me....
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.