Question 121 markMCQSection A

A table has two candidate keys, one of which is chosen as the primary key. How many alternate keys does this table have ?

Database Concepts
Candidate, Primary & Alternate Keys

Options

(A)0
(B)1
(C)2
(D)3

Official answer

Correct option: (B) 1


Out of the two candidate keys, one becomes the primary key and the remaining one automatically becomes an alternate key, so the table has exactly 1 alternate key.

Answer keywords:candidate keyprimary keyalternate keyrelational data modeldatabase keysunique identification

Marking scheme

  1. 1.1 mark: correct option (B) 1 selected.

Hint

Alternate keys = total candidate keys minus the one chosen as primary key.

Quick oral answer

Alternate keys are the candidate keys not chosen as the primary key; with 2 candidate keys and 1 chosen as primary, exactly 1 remains as an alternate key.

Common mistakes

  1. 1.Counting the primary key itself as an alternate key.
  2. 2.Confusing candidate keys with all unique attributes of the table rather than just the minimal identifying sets.

Analysis and explanation

This question tests the relationship between candidate keys, primary keys, and alternate keys in the relational data model.


Why (B) is correct

  • A candidate key is any attribute (or set of attributes) that can uniquely identify a tuple.
  • When a table has more than one candidate key, only one is selected to be the primary key.
  • Every other candidate key that is NOT chosen as the primary key is called an alternate key.
  • Here, there are 2 candidate keys; 1 becomes the primary key, so the remaining 2−1=12 - 1 = 1 candidate key becomes the alternate key.

Why the other options are wrong

  • (A) 0 would be true only if there were just one candidate key in total.
  • (C) 2 wrongly assumes the primary key itself is also counted as an alternate key.
  • (D) 3 has no basis — the table only has 2 candidate keys in total, so there cannot be 3 alternate keys.

Interesting facts

The concept of candidate keys, primary keys and alternate keys comes from E.F. Codd's relational model proposed in 1970, which forms the theoretical basis of all modern RDBMS like MySQL and Oracle.

A table can have a composite candidate key made of two or more columns together, and such a combination can also become an alternate key if not chosen as primary.

Question details

Q12 of 48 questions

Board
CBSE
Class
Class 12
Subject
Computer Science
Year
2026
Section
Section A
Marks
1
Type
MCQ
Chapter
Database Concepts
Topic
Candidate, Primary & Alternate Keys
Bloom's level
understand
Syllabus topic
Unit 3: Database Management — Keys: Candidate, Primary and Alternate Keys
Author
CBSE
Reviewed by
Padhantu Academic Team

Spotted a mistake or something unclear?

Tell us and we will fix it.

Frequently asked questions

What is the difference between a candidate key and a primary key?

A candidate key is any minimal set of attributes that can uniquely identify each row in a table; a table can have multiple candidate keys. The primary key is the one candidate key that the database designer selects as the main identifier for the table; only one primary key is allowed per table.

Can a table have zero alternate keys?

Yes. If a table has only one candidate key, that single key must be chosen as the primary key, leaving zero alternate keys.