24,268 views
63 63 votes

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$

6 Answers

Best answer
55 55 votes
Answer (B).

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 a prime attribute. And conversely, an attribute that does not occur in ANY candidate key is called a non-prime attribute.
selected by
63 63 votes

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.

edited by
1 1 vote
  • Candidate Key: A minimal set of attributes that uniquely identify a tuple.

  • Prime Attribute: Any attribute that is part of at least one candidate key.

  • Non-prime Attribute: Not part of any candidate key.

Given:
Relation R(A, B, C, D, E, F)
Candidate Keys = {A, B}, {C}

So:

  • Candidate Key 1: AB

  • Candidate Key 2: C

  • A, B, and C are prime

  • D, E, F are non-prime

  • A and B appear in one candidate key (AB), but not in all.C is in a different candidate key.

  • Yet all of them (A, B, C) are still prime.

Why "in all candidate keys" is Wrong?

If "prime attribute = in all candidate keys", then:

  • In this, only C would qualify (since it’s the only one in its candidate key).

  • But that’s wrong — both A, B, and C are prime.

So, prime attribute just means:

Appears in at least one candidate key.

Prime attribute = An attribute that is part of at least one candidate key
It is not necessary for it to be in all candidate keys.

"If an attribute is in even one candidate key, then it's a prime attribute."

    0 0 votes
    Answer: B

    A prime attribute should be a part of any one candidate key NOT ALL the candidate keys.

    Example: R (A,B,C,D,E)

    Let, Candidate keys: AB, BC

    Prime attributes: A, B, C

    Note: A appears in AB but NOT in BC. Similarly, C appears in BC but NOT in AB.

    Answer:
    Position:
    Show:

    Related questions

    9 9 votes
    5 answers 5 answers
    8.9k
    8.9k views
    go_editor asked Sep 28, 2014
    8,858 views
    In the context of modular software design, which one of the following combinations is desirable?High cohesion and high couplingHigh cohesion and low couplingLow cohesion ...
    51 51 votes
    4 answers 4 answers
    13.4k
    13.4k views
    go_editor asked Sep 28, 2014
    13,393 views
    Given an instance of the STUDENTS relation as shown as below$$\begin{array}{|c|c|c|c|c|} \hline \textbf {StudentID} & \textbf{StudentName} & \textbf{StudentEmail} & \text...
    75 75 votes
    10 answers 10 answers
    26.9k
    26.9k views
    go_editor asked Sep 28, 2014
    26,909 views
    Consider the following relational schema:employee (empId,empName,empDept) customer (custId,custName,salesRepId,rating) salesRepId is a foreign key referring to empId of t...
    61 61 votes
    6 answers 6 answers
    17.5k
    17.5k views
    go_editor asked Sep 28, 2014
    17,515 views
    What is the optimized version of the relation algebra expression $\pi_{A1}(\pi_{A2}(\sigma_{F1}(\sigma_{F2}(r))))$, where $A1, A2$ are sets of attributes in $r$ with $A1...