First time here? Checkout the FAQ!
+2 votes

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

(A) in all candidate keys of $R$

(B) in some candidate key of $R$

(C) in a foreign key of $R$

(D) only in the primary key of $R$

asked in Databases by Veteran (73.2k points)   | 413 views
Why some?  Why not all?
check below comment.

2 Answers

+9 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 Veteran (10.6k points)  
selected by
@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

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.

@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
AC→A [ Trivial ]

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

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.
Got it :)
–3 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 Loyal (3.1k points)  

Related questions

Top Users Jan 2017
  1. Debashish Deka

    7050 Points

  2. Habibkhan

    4674 Points

  3. Vijay Thakur

    4224 Points

  4. saurabh rai

    4008 Points

  5. sudsho

    3960 Points

  6. Arjun

    3108 Points

  7. GateSet

    3088 Points

  8. santhoshdevulapally

    3004 Points

  9. Bikram

    2976 Points

  10. Sushant Gokhale

    2744 Points

Monthly Topper: Rs. 500 gift card

18,810 questions
23,779 answers
20,128 users