Which of the following best describes the role of a primary key in a database table?
Think about what makes each row in a table unique and mandatory.
A primary key uniquely identifies each record in a table and cannot have NULL values, ensuring each row is distinct.
Which statement correctly defines a candidate key?
Think about keys that could potentially be primary keys.
Candidate keys are all possible keys that can uniquely identify records; one of them is selected as the primary key.
What is the main purpose of a foreign key in a relational database?
Consider how tables relate to each other in a database.
A foreign key links a record in one table to a primary key in another, ensuring data consistency across tables.
Which of the following statements correctly distinguishes a super key from a candidate key?
Think about minimality and uniqueness in keys.
A super key uniquely identifies records but may have extra attributes; a candidate key is a minimal super key without unnecessary attributes.
Consider a table Employees with columns: EmployeeID, Email, PhoneNumber, and DepartmentID. Which of the following is not a valid candidate key?
Candidate keys must uniquely identify records without duplicates.
If PhoneNumber is shared by multiple employees, it cannot uniquely identify records and thus is not a candidate key.