The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+20 votes
1.9k views

A prime attribute of a relation scheme $R$ is an attribute that appears

  1. in all candidate keys of $R$
  2. in some candidate key of $R$
  3. in a foreign key of $R$
  4. only in the primary key of $R$
asked in Databases by Veteran (101k points) | 1.9k views
+1
Why some?  Why not all?
+2
check below comment.
0
I have a different doubt what if candidate key is= A then is A a prime attribute.??
0
if FD : A->BC over R(A,B,C) ,

CK : A

prime attribute : A
0
in any candidate keys is correct..?

3 Answers

+27 votes
Best answer

Prime attribute is a constituent of a candidate key. it need not present in all candidate keys. Hence, option B is correct.

Correct me if i went wrong.

answered by Boss (11.5k points)
edited by
0
@Sankar: yes you are correct it is sufficient if the prime attribute is in any of candidate key. did not read all the options , my bad
+28

Consider a relation $R(ABCDE)$ and $FD =\left \{ AB\rightarrow CD,C\rightarrow B,D\rightarrow E \right \}$.

Here Candidate key  are $AB$ and $AC$.

Prime Attribute:$A$,$B$,$C$.

Now check is B is appearing in both C.K.?No

So prime attribute appears in some CK.

0

@ManojK sir , It wiould be nice if you could explain ( or verify ) how to find the prime attribute

AFAIK ,  Prime attributes are part of CK
Here CK are AB, AC .  Dependncies invloving them
AB→CD
AC→B
AC→A [ Trivial ]

$\Rightarrow$ (Prime attributes are part of Key ) Prime attributes are CD, C,D,B,A

+2
As you stated Prime attributes are part of CK .

CD is nether CK nor part of any CK here then how CD,D becomes prime attribute.
+2
Got it :)
0
nice explanation satisfy with your explanation.
+4 votes
Answer (B).

The constituent attributes of a Candidate key or simply the attributes of a candidate key are called the prime attributes. Suppose ABC is one candidate key of a Relation R(ABCDEFGH). Then the attributes A, B and C all are prime attributes. Similarly if ABD is also another candidate key in the same relation R, then D is also the prime attribute. And conversely, an attribute that does not occur in ANY candidate key is called a non-prime attribute.
answered by Loyal (8.4k points)
–6 votes

(A) in all candidate keys of $R$

a prime attribute need not be necessaryly in the primary key alone, though attributes in all the candidate key are considered prime attribute

answered by Active (3.3k points)
0
it need not be  in all candidate keys of R
Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

39,439 questions
46,623 answers
139,370 comments
57,017 users