'Difference between non-prime and non-key attributes in Database
I am a little bit confused between non-prime attribute and non-key attribute I have searched a bit about them and found that non-prime attribute means An attribute which is never included in any candidate key. non-key attribute means attribute that does not uniquely identify an instance of an entity. What exactly is the difference between them?? For example for a relation
R (A,B,C,D,E)
{
AB-->E
CD-> E
}
Can you please tell me which of the attributes are non-key attributes and which of the attributes are non-prime attributes?? Sorry if this was a trivial question
Solution 1:[1]
Prime attribute means the same as key attribute. Non-prime attribute means the same as non-key attribute.
In your example we can deduce the key to be {A,B,C,D}; A,B,C,D are prime attributes; E is non-prime.
Solution 2:[2]
If the attribute is not a member of any candidate key
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | nvogel |
Solution 2 | pranee_01 |