Which one is correct w.r.t. RDBMS ?

2017

Which one is correct w.r.t. RDBMS ?

  1. A.

    primary key ⊆ super key ⊆ candidate key

  2. B.

    primary key ⊆ candidate key ⊆ super key

  3. C.

    super key ⊆ candidate key ⊆ primary key

  4. D.

    super key ⊆ primary key ⊆ candidate key

Attempted by 1092 students.

Show answer & explanation

Correct answer: B

Correct relationship: primary key ⊆ candidate key ⊆ super key

  • Superkey: A set of attributes that uniquely identifies a tuple in a relation. A superkey may contain extra attributes that are not necessary for uniqueness.

  • Candidate key: A minimal superkey, i.e., a superkey with no proper subset that is also a superkey.

  • Primary key: A single candidate key chosen to uniquely identify tuples in a relation.

Explanation: Because a primary key is one chosen candidate key, and every candidate key is by definition a superkey, the correct inclusion order is primary key ⊆ candidate key ⊆ superkey. Equality can hold between primary key and some candidate key since the primary key is exactly one candidate key.

Example: For a relation Student(ID, Name, Email), if ID uniquely identifies students, {ID} is a candidate key (and may be chosen as the primary key). A set like {ID, Email} is a superkey because it also uniquely identifies tuples but is not minimal.

Explore the full course: Mppsc Assistant Professor