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

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

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

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

minijebu avatar image minijebu commented ·
Thanks for your reply. so,can i call a super key with 2 attributes as a compound key?
0 Likes 0 ·
Magnus Ahlkvist avatar image Magnus Ahlkvist commented ·
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 ·
minijebu avatar image minijebu commented ·
Thanks! This helps me....
0 Likes 0 ·
Pranjali13 avatar image
Pranjali13 answered

A super key is a set of all the keys (with single or multiple attributes) which can uniquely identify the records of the table.

A compound key uses two or more attributes to accomplish the same objective.

10 |1200

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

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.