Consider a relational table with a single record for each registered student…
2011
Consider a relational table with a single record for each registered student with the following attributes:
Registration_Num: Unique registration number for each registered student
UID: Unique identity number, unique at the national level for each citizen
BankAccount_Num: Unique account number at the bank. A student can have multiple accounts or joint accounts. This attribute stores the primary account number.
Name: Name of the student
Hostel_Room: Room number of the hostel
Which of the following options is INCORRECT?
- A.
BankAccount_Num is a candidate key
- B.
Registration_Num can be a primary key
- C.
UID is a candidate key if all students are from the same country
- D.
If S is a super key such that S ∩ UID is NULL then S ∪ UID is also a superkey
Attempted by 602 students.
Show answer & explanation
Correct answer: A
Answer: BankAccount_Num is not a candidate key.
Reason BankAccount_Num fails: A candidate key must uniquely and minimally identify each record. Because accounts can be joint (shared by multiple students) and a student can have multiple accounts (or possibly no account), BankAccount_Num does not reliably provide uniqueness.
Why Registration_Num works: It is specified as unique for each registered student, so it can serve as a primary key.
Why UID can be a candidate key (given the condition): UID is unique at the national level, so if all students are from the same country, UID will uniquely identify each student.
Why adding UID to a superkey preserves the property: A superkey already uniquely identifies tuples; any superset of a superkey (such as adding UID) still uniquely identifies tuples, so the result is also a superkey.
A video solution is available for this question — log in and enroll to watch it.