All Exams Test series for 1 year @ ₹349 only
Question

Consider the following database table having A, B, C and D as its four attributes and four possible candidate keys (I, II, III and IV) for this table :
ABCD
$a_1$$b_1$$c_1$$d_1$
$a_2$$b_3$$c_3$$d_1$
$a_1$$b_2$$c_1$$d_2$

I : {B} II : {B, C} III : {A, D} IV : {C, D}
If different symbols stand for different values in the table (e.g., $d_1$ is definitely not equal to $d_2$), then which of the above could not be the candidate key for the database table ?

The correct answer is
II only

Understanding Candidate Keys

A candidate key is a set of attributes that can uniquely identify each row in a database table. It must satisfy two conditions:

  • Uniqueness: The combination of values for the attributes in the candidate key must be unique for every row.
  • Minimality: No proper subset of the candidate key can uniquely identify rows. If a smaller set of attributes already uniquely identifies rows, the larger set cannot be minimal.

Database Table Representation

The given table has attributes A, B, C, and D. The data is as follows:

A B C D
$a_1$ $b_1$ $c_1$ $d_1$
$a_2$ $b_3$ $c_3$ $d_1$
$a_1$ $b_2$ $c_1$ $d_2$

Analyzing Potential Candidate Keys

We check each potential candidate key for uniqueness and minimality.

Key I: {B}

  • Uniqueness Check: The values for attribute B are $b_1$, $b_3$, and $b_2$. These are all distinct. Thus, {B} is unique.
  • Minimality Check: Since {B} consists of a single attribute, it is inherently minimal.
  • Conclusion: {B} could be a candidate key.

Key II: {B, C}

  • Uniqueness Check: Combinations of (B, C) are ($b_1$, $c_1$), ($b_3$, $c_3$), and ($b_2$, $c_1$). These are all distinct. Thus, {B, C} is unique.
  • Minimality Check: We must check if any proper subset uniquely identifies rows. We already know {B} uniquely identifies rows (from Key I analysis).
  • Conclusion: Since {B} alone is unique, {B, C} is not minimal. Therefore, {B, C} could not be a candidate key.

Key III: {A, D}

  • Uniqueness Check: Combinations of (A, D) are ($a_1$, $d_1$), ($a_2$, $d_1$), and ($a_1$, $d_2$). These are all distinct. Thus, {A, D} is unique.
  • Minimality Check:
    • Check {A}: Values are $a_1$, $a_2$, $a_1$. $a_1$ repeats, so {A} is not unique.
    • Check {D}: Values are $d_1$, $d_1$, $d_2$. $d_1$ repeats, so {D} is not unique.
    Since neither {A} nor {D} alone is unique, {A, D} is minimal.
  • Conclusion: {A, D} could be a candidate key.

Key IV: {C, D}

  • Uniqueness Check: Combinations of (C, D) are ($c_1$, $d_1$), ($c_3$, $d_1$), and ($c_1$, $d_2$). These are all distinct. Thus, {C, D} is unique.
  • Minimality Check:
    • Check {C}: Values are $c_1$, $c_3$, $c_1$. $c_1$ repeats, so {C} is not unique.
    • Check {D}: Values are $d_1$, $d_1$, $d_2$. $d_1$ repeats, so {D} is not unique.
    Since neither {C} nor {D} alone is unique, {C, D} is minimal.
  • Conclusion: {C, D} could be a candidate key.

Identifying Keys That Could Not Be Candidate Keys

Based on the analysis, only key {B, C} (II) fails the minimality condition because {B} alone uniquely identifies rows.

Therefore, the set of attributes that could not be the candidate key is II only.

Was this answer helpful?

Important Questions from Functional Dependency

  1. Relation R has eight attributes ABCDEFGH. Fields of R contain only atomic values.

    F = {CH → G, A → BC, B → CFH, E → A, F → EG} is a set of functional dependencies (FDs) so that F+ is exactly the set of FDs that hold for R.

    The relation R is

  2. Let $P, Q, R$ and $S$ be the attributes of a relation in a relational schema. Let $X \rightarrow Y$ indicate functional dependency in the context of a relational database, where $X, Y \subseteq \{P, Q, R, S\}$.
    Which of the following options is/are always true?
  3. In the context of schema normalization in relational DBMS, consider a set F of functional dependencies. The set of all functional dependencies implied by F is called the closure of F. To compute the closure of F, Armstrong's Axioms can be applied. Consider $X$, $Y$, and $Z$ as sets of attributes over a relational schema. The three rules of Armstrong's Axioms are described as follows.

    Reflexivity: If $Y \subseteq X$, then $X \rightarrow Y$
    Augmentation: If $X \rightarrow Y$, then $XZ \rightarrow YZ$ for any $Z$
    Transitivity: If $X \rightarrow Y$ and $Y \rightarrow Z$, then $X \rightarrow Z$

    The additional rule of Union is defined as follows.

    Union: If $X \rightarrow Y$ and $X \rightarrow Z$, then $X \rightarrow YZ$

    It can be proved that the additional rule of Union is also implied by the three rules of Armstrong's Axioms. Listed below are four combinations of these three rules. Which one of these combinations is both necessary and sufficient for the proof ?
  4. Let R = ABCDE is a relational scheme with functional dependency set F = {A → B, B → C, AC → D}. The attribute closures of A and E are

  5. A relation R = {A, B, C, D, E, F,G} is given with following set of functional dependencies :

    F = {AD → E, BE → F, B → C, AF → G}

    Which of the following is a candidate key ?

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App