arrow
arrow
arrow
Which of the following are true? A. A database may have only one primary key B. Every key is a candidate key C. There can be multiple candida
Question

Which of the following are true?
A. A database may have only one primary key
B. Every key is a candidate key
C. There can be multiple candidate keys
D. There can be more than one super key
E. Every candidate key is a primary key
Choose the correct answer from the options given below:

A.

A, C, D only

B.

A, D, E only

C.

B, C, D only

D.

B, D, E only

Correct option is A


In the relational database model, a primary key is one candidate key selected by the database designer to uniquely identify each tuple in a relation. Hence, a relation can have only one primary key, although that primary key may consist of multiple attributes.
A relation can have multiple candidate keys, because several minimal attribute sets may uniquely identify tuples. Every candidate key is a super key, but not every super key is a candidate key because a super key may contain unnecessary attributes. Also, there can be multiple super keys because any superset of a candidate key is also a super key.
Information Booster
1. Primary Key
· A primary key is the candidate key selected by the database designer to uniquely identify tuples in a relation.
· A relation can have only one primary key.
· It may be a single attribute or a composite key containing multiple attributes.
· Primary-key values must be unique and cannot normally be NULL.
2. Candidate Key
· A candidate key is a minimal super key.
· It uniquely identifies every tuple while containing no unnecessary attribute.
· A relation can have more than one candidate key.
· One of these candidate keys is selected as the primary key, while the remaining ones are called alternate keys.
3. Super Key
· A super key is any set of one or more attributes that can uniquely identify each tuple.
· It does not have to be minimal.
· If a candidate key is K, then every superset of K is also a super key.
· Therefore, a relation can have many super keys.
4. Relationship among Keys
Primary Key ⊆ Candidate Keys ⊆ Super Keys
More precisely, the primary key is one selected candidate key and every candidate key is a super key.
5. Example
· Consider a STUDENT relation:
STUDENT(RollNo, Email, Name, Course)
· Suppose both RollNo and Email uniquely identify students.
· Candidate keys:
{RollNo}, {Email}
· If RollNo is selected as the primary key, Email becomes an alternate candidate key.
· Sets such as {RollNo, Name}are super keys but not candidate keys, because Name is unnecessary.
Additional Knowledge
· Statement A — True: A relation has only one primary key, even when several candidate keys exist. The primary key is selected from those candidate keys.
· Statement B — False: Not every key is a candidate key. A super key containing unnecessary attributes is not a candidate key. For example, if {RollNo} is a candidate key, {RollNo, Name} is a super key but not a candidate key.
· Statement C — True: Multiple candidate keys can exist in the same relation. For example, both EmployeeID and Email may independently and minimally identify an employee.
· Statement D — True: There can be more than one super key. Starting with a candidate key, adding additional attributes produces additional super keys.
· Statement E — False: Every candidate key is not a primary key. Only the candidate key chosen as the primary key is the primary key; the others remain alternate keys.

Free Tests

Free
Must Attempt

Basics of Education: Pedagogy, Andragogy, and Hutagogy

languageIcon English
  • pdpQsnIcon10 Questions
  • pdpsheetsIcon20 Marks
  • timerIcon12 Mins
languageIcon English
Free
Must Attempt

UGC NET Paper 1 Mock Test 1

languageIcon English
  • pdpQsnIcon50 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English
Free
Must Attempt

Basics of Education: Pedagogy, Andragogy, and Hutagogy

languageIcon English
  • pdpQsnIcon10 Questions
  • pdpsheetsIcon20 Marks
  • timerIcon12 Mins
languageIcon English

Similar Questions

test-prime-package

Access ‘UGC NET Computer Science’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
528k+ students have already unlocked exclusive benefits with Test Prime!

Similar Questions

Our Plans
Monthsup-arrow