Question
A prime attribute of a relation scheme is an attribute that appears
Official answer and solution
- Official answer
- B
- From
- Official GATE 2014 answer key
Solution
Recall the formal relational database definitions of candidate keys and prime versus non-prime attributes.
-
In relational database schema design:
- A superkey is a set of attributes that uniquely identifies each tuple in a relation.
- A candidate key is a minimal superkey (no proper subset is a superkey).
-
Prime Attribute:
An attribute of a relation schema is defined as a prime attribute if it is a member of at least one (some) candidate key of . -
Non-prime Attribute:
An attribute is non-prime if it does not belong to any candidate key of . -
Thus, a prime attribute does not need to appear in all candidate keys (which would be the intersection of candidate keys), nor is it restricted only to the primary key. It suffices to appear in some candidate key.
Therefore, option B is correct.
B
Confusing 'some candidate key' with 'all candidate keys' or thinking prime attributes belong only to the primary key.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2014 Computer Science and Information Technology (CS) Session 3
- Question
- 32 of 65, printed as CS Q.22
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.