Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to identify a candidate key in a relation.
DBMS Theory
A candidate key is a minimal set of attributes [1] uniquely identify tuples in a relation.
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'which' instead of 'that' can change the meaning.
✗ Incorrect
The phrase 'a minimal set of attributes that uniquely identify tuples' correctly describes a candidate key.
2fill in blank
mediumComplete the sentence to explain BCNF condition.
DBMS Theory
A relation is in BCNF if for every functional dependency X [1] Y, X is a superkey.
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<-' reverses the dependency direction.
✗ Incorrect
The arrow '->' denotes a functional dependency from X to Y.
3fill in blank
hardFix the error in the BCNF definition.
DBMS Theory
In BCNF, every determinant [1] a superkey. Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using plural verb 'are' with singular subject.
✗ Incorrect
'Determinant' is singular, so the verb must be 'is'.
4fill in blank
hardFill in the blank to complete the BCNF condition statement.
DBMS Theory
If a relation has a functional dependency [1], then the left side must be a superkey. Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect symbols like '<-' or '=' for functional dependencies.
✗ Incorrect
The functional dependency is represented as 'X -> Y'.
5fill in blank
hardFill all three blanks to complete the BCNF example code snippet.
DBMS Theory
relation = { 'attributes': ['A', 'B'], 'functional_dependencies': [('[1]', '[2]')], 'candidate_keys': ['[3]'] } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing single attributes with candidate keys which can be multiple attributes.
✗ Incorrect
The functional dependency is from 'A' to 'B', and the candidate key is 'A' which uniquely identifies tuples.