0
0
DBMS Theoryknowledge~5 mins

Keys (primary, candidate, foreign, super) in DBMS Theory - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
APrimary Key
BForeign Key
CCandidate Key
DSuper Key
What type of key is used to link two tables together?
ACandidate Key
BPrimary Key
CForeign Key
DSuper Key
Which key is a minimal set of columns that can uniquely identify a record?
AForeign Key
BCandidate Key
CSuper Key
DPrimary Key
A Super Key may contain:
AExtra columns beyond what is needed for uniqueness
BOnly one column
COnly foreign keys
DNo columns
Which key is chosen from candidate keys to uniquely identify records?
AForeign Key
BSuper Key
CComposite Key
DPrimary Key
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.