Question

Which of the following is NOT a superkey in a relational schema with attributes V,W,X,Y,ZV, W, X, Y, Z and primary key VYVY?

Choose one option
Official answer and solution
Official answer
B
From
Official GATE 2016 answer key

Solution

Check whether each attribute set contains the primary key VY as a subset.

Definition: In a relational schema, a superkey is any set of attributes that contains a candidate key (or the primary key) as a subset.

The primary key of the schema is given as VYVY. Therefore, any attribute set KK is a superkey if and only if:

{V,Y}⊆K\{V, Y\} \subseteq K

Check each candidate set:

  • (A) VXYZVXYZ: contains VV and YY (is a superkey)
  • (B) VWXZVWXZ: contains VV but lacks YY (NOT a superkey)
  • (C) VWXYVWXY: contains VV and YY (is a superkey)
  • (D) VWXYZVWXYZ: contains VV and YY (is a superkey)

Therefore, VWXZVWXZ is NOT a superkey.

Final answer

B

Common trap

Overlooking the missing attribute YY in VWXZVWXZ due to the visual similarity of attribute letters.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2016 Computer Science and Information Technology (CS) Session 1
Question
31 of 65, printed as CS Q.21
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.