Are middle attributes on a relation schemma prime?

In a relation schema, if:

  1. an attribute appears only on the left side then it is prime.
  2. an attribute appears only on the right side then it is non-prime.

But what happens when there are attributes in the middle? Are they prime if they are a subset of the key?


  • Start from scratch with what you think a prime attribute is, because your definition is incomplete.

    For an attribute to be prime, is has to be part of a candidate key. Now, in your case, it happens that A is prime and the rest are not (Since the only candidate key is A). But take this scenario: F={ {A->C}, {B->C}, {C->D}, {D->AB} }. In this case, there are two candidate keys: AB, and D.

    This means that A, B, and D are all prime, since they are all parts of candidate keys, and C is not.