Recall & Review
beginner
What is a Primary Key in a database?
A Primary Key is a unique identifier for each record in a database table. It ensures that no two rows have the same key value and cannot be null.
Click to reveal answer
beginner
Define Candidate Key.
A Candidate Key is a column or a set of columns that can uniquely identify any record in a table. One of these candidate keys is chosen as the Primary Key.
Click to reveal answer
beginner
What is a Foreign Key?
A Foreign Key is a column or set of columns in one table that refers to the Primary Key in another table. It creates a link between the two tables.
Click to reveal answer
intermediate
Explain Super Key.
A Super Key is any set of columns that uniquely identifies a record in a table. It may contain extra columns beyond what is needed for uniqueness.
Click to reveal answer
intermediate
How does a Candidate Key differ from a Super Key?
A Candidate Key is a minimal Super Key, meaning it has no unnecessary columns. A Super Key can have extra columns that are not needed for uniqueness.
Click to reveal answer
Which key uniquely identifies each record in a table and cannot have null values?
✗ Incorrect
The Primary Key uniquely identifies each record and cannot be null.
What type of key is used to link two tables together?
✗ Incorrect
A Foreign Key in one table refers to the Primary Key in another, linking the tables.
Which key is a minimal set of columns that can uniquely identify a record?
✗ Incorrect
Candidate Keys are minimal unique identifiers; one is chosen as the Primary Key.
A Super Key may contain:
✗ Incorrect
Super Keys can have extra columns that are not necessary for uniqueness.
Which key is chosen from candidate keys to uniquely identify records?
✗ Incorrect
The Primary Key is selected from candidate keys to uniquely identify records.
Explain the differences between Primary Key, Candidate Key, Foreign Key, and Super Key.
Think about uniqueness and relationships between tables.
You got /4 concepts.
Why is it important to have a Primary Key in a database table?
Consider how databases organize and connect data.
You got /4 concepts.