0
0
DBMS Theoryknowledge~10 mins

Keys (primary, candidate, foreign, super) in DBMS Theory - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the sentence to identify the key that uniquely identifies each record in a table.

DBMS Theory
The [1] key uniquely identifies each record in a database table.
Drag options to blanks, or click blank then click option'
Aforeign
Bsuper
Ccandidate
Dprimary
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing primary key with foreign key.
Thinking candidate key is always used as the main key.
2fill in blank
medium

Complete the sentence to identify the key that can potentially be chosen as a primary key.

DBMS Theory
A [1] key is a minimal set of attributes that can uniquely identify a record.
Drag options to blanks, or click blank then click option'
Asuper
Bcandidate
Cforeign
Dprimary
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing candidate key with foreign key.
Assuming candidate key is always the primary key.
3fill in blank
hard

Complete the sentence to identify the key that links two tables.

DBMS Theory
A [1] key is used to link two tables.
Drag options to blanks, or click blank then click option'
Aforeign
Bprimary
Ccandidate
Dsuper
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing foreign key with primary key.
Thinking foreign key must be unique.
4fill in blank
hard

Fill both blanks to complete the definition of a super key.

DBMS Theory
A [1] key is a set of one or more attributes that [2] uniquely identify a record in a table.
Drag options to blanks, or click blank then click option'
Asuper
Bcandidate
Ccan
Dcannot
Attempts:
3 left
💡 Hint
Common Mistakes
Thinking super key must be minimal.
Confusing super key with foreign key.
5fill in blank
hard

Fill all three blanks to complete the dictionary comprehension that selects candidate keys from a list.

DBMS Theory
candidate_keys = { [1]: [2] for [3] in keys if is_candidate([3]) }
Drag options to blanks, or click blank then click option'
Ak
Bk.upper()
Dkeys
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong variable name in the comprehension.
Mixing up keys and values in the dictionary.