Which statement correctly distinguishes candidate keys from superkeys?

Prepare for the Veritas Qualifying Exam with comprehensive quizzes featuring multiple-choice questions, detailed explanations, and useful tips. Master the exam material and boost your confidence!

Multiple Choice

Which statement correctly distinguishes candidate keys from superkeys?

Explanation:
The important distinction is minimality versus just uniqueness. A superkey is any combination of attributes that uniquely identifies a row. A candidate key is a superkey, but a minimal one: you can’t remove any attribute from a candidate key without losing the ability to uniquely identify the row. So, every candidate key is a superkey, but not every superkey is a candidate key. A relation can have several candidate keys, and one of them (or more) can be chosen as the primary key. For example, if both StudentID and Email uniquely identify a row, {StudentID} and {Email} are candidate keys, while {StudentID, Email} is a superkey that isn’t minimal and thus isn’t a candidate key.

The important distinction is minimality versus just uniqueness. A superkey is any combination of attributes that uniquely identifies a row. A candidate key is a superkey, but a minimal one: you can’t remove any attribute from a candidate key without losing the ability to uniquely identify the row.

So, every candidate key is a superkey, but not every superkey is a candidate key. A relation can have several candidate keys, and one of them (or more) can be chosen as the primary key. For example, if both StudentID and Email uniquely identify a row, {StudentID} and {Email} are candidate keys, while {StudentID, Email} is a superkey that isn’t minimal and thus isn’t a candidate key.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy