-2

What are the attributes called which combine to form a primary key?

The answer given is superkey which seems wrong. I reckon prime attribute.

philipxy
  • 14,867
  • 6
  • 39
  • 83
  • 1
    I didn't say it was a textbook question, I meant that your textbook is a basic source of information that you should go to before you consider asking a question & that you should show "reasearch effort" & also not ask people to effectively do your research or (home)work for you. – philipxy May 09 '19 at 05:57

1 Answers1

1

What are the attributes called which combine to form a primary key?

Under the relational model:

There's no such special term. The attributes that appear in some CK (candidate key) are called the prime attributes. A PK (primary key) is one CK that you decided to call the PK.

The attributes of a PK are prime, but not all prime attributes need to be attributes of a PK, since there can be CKs other than the PK, or maybe no CK was chosen as PK.

If a relation has only one CK & it is the PK then the PK's attributes are the prime attributes.

But we don't need a special term since we could just say "PK attribute". Just like we don't need "prime" since we could just say "CK attribute".

The answer given is Super key

A superkey is a set of columns whose values are unique. A CK is a superkey that contains no smaller superkey. So a PK is a superkey. But there can be superkeys that are not CKs or PKs--every larger superset of a CK.

PS In SQL, assuming no duplicate rows or duplicate columns names or nulls, so we can take a table to be a relation in the obvious way & apply relational terminology, a UNIQUE declaration or so-called PK declaration declares a superkey.

philipxy
  • 14,867
  • 6
  • 39
  • 83