ISRO Computer Science (CSE) 2014 - Question 42

All ISRO Computer Science (CSE) papers | ISRO Computer Science (CSE) 2014

Let $x, y, z, a, b, c$ be the attributes of an entity set E. If $\{x\}, \{x, y\}, \{a, b\}, \{a, b, c\}, \{x, y, z\}$ are superkeys then which of the following are the candidate keys?

  • A. $\{x, y\}$ and $\{a, b\}$
  • B. $\{x\}$ and $\{a, b\}$
  • C. $\{x, y, z\}$ and $\{a, b, c\}$
  • D. $\{z\}$ and $\{c\}$

Answer: B. $\{x\}$ and $\{a, b\}$

Explanation: Candidate keys are minimal superkeys.\n$\{x\}$ is a superkey. $\{x, y\}$ contains $\{x\}$, so not minimal. $\{x, y, z\}$ contains $\{x\}$, not minimal.\n$\{a, b\}$ is a superkey. $\{a, b, c\}$ contains $\{a, b\}$, not minimal.\nSo $\{x\}$ and $\{a, b\}$ are candidate keys.

| | All questions of ISRO Computer Science (CSE) 2014