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

Let $R(A,B,C,D,E)$ be a relational schema with functional dependency set $F=\{A\rightarrow BC,\ CD\rightarrow E,\ E\rightarrow A\}$.

Which of the following statements is correct?

The correct answer is
AD, ED and CD are the only candidate keys of R.

Key Identification in R(A,B,C,D,E) Schema

The goal is to find the candidate keys for the relational schema $R(A,B,C,D,E)$ using the given functional dependencies $F=\{A\rightarrow BC,\ CD\rightarrow E,\ E\rightarrow A\}$. Candidate keys are minimal attribute sets that functionally determine all attributes in the relation.

Analyzing Functional Dependencies

The provided functional dependencies (FDs) are:

  • $A \rightarrow BC$
  • $CD \rightarrow E$
  • $E \rightarrow A$

Finding Necessary Attributes for Keys

Identify attributes that do not appear on the right-hand side (RHS) of any FD. These attributes must be part of every candidate key.

In this set $F$, the attribute D is the only one not appearing on the RHS. Therefore, any candidate key must include D.

Calculating Attribute Closures

We compute the closures for potential keys involving D to see if they determine all attributes $\{A, B, C, D, E\}$.

  • $D^+$: $D^+ = D$. This does not cover all attributes.
  • $AD^+$:
    1. Initial set: $AD$.
    2. Using $A \rightarrow BC$: $ADBC$.
    3. Using $CD \rightarrow E$: $ADBC E$.
    4. Using $E \rightarrow A$: A is already present.
    5. Result: $AD^+ = \{A, B, C, D, E\}$. AD is a superkey. It is minimal since $A^+$ misses D/E and $D^+$ misses A/B/C/E. Thus, AD is a candidate key.
  • $CD^+$:
    1. Initial set: $CD$.
    2. Using $CD \rightarrow E$: $CDE$.
    3. Using $E \rightarrow A$: $CDEA$.
    4. Using $A \rightarrow BC$: B and C are already present.
    5. Result: $CD^+ = \{A, B, C, D, E\}$. CD is a superkey. It is minimal since $C^+$ misses D/A/E and $D^+$ misses A/B/C/E. Thus, CD is a candidate key.
  • $ED^+$:
    1. Initial set: $ED$.
    2. Using $E \rightarrow A$: $EDA$.
    3. Using $A \rightarrow BC$: $EDABC$.
    4. Using $CD \rightarrow E$: E is already present.
    5. Result: $ED^+ = \{A, B, C, D, E\}$. ED is a superkey. It is minimal since $E^+$ misses D/C and $D^+$ misses A/B/C/E. Thus, ED is a candidate key.

Identifying Candidate Keys

The minimal sets of attributes that determine all attributes $\{A, B, C, D, E\}$ are AD, CD, and ED.

These are the only candidate keys for the relation $R$. The correct statement is the one listing these three sets as the only candidate keys.

Was this answer helpful?

Important Questions from Relational Model

  1. Given the relational schema $R = (U,V,W, X, Y, Z)$ and the set of functional dependencies: $$\{U \rightarrow V, U \rightarrow W, WX \rightarrow Y, WX \rightarrow Z, V \rightarrow X\}$$ Which of the following functional dependencies can be derived from the above set?

  2. The ‘12 Rules for Relational Database’ were given by
  3. Which of the following statement(s) is/are FALSE in the context of Relational DBMS ?
    I. Views in a database system are important because they help with access control by allowing users to see only a particular subset of the data in the database.
    II. E-R diagrams are useful to logically model concepts.
    III. An update anomaly is when it is not possible to store information unless some other, unrelated information is stored as well.
    IV. SQL is a procedural language.
  4. Consider R (A,B,C,D,E) be relation with following dependencies:
    C- >F, E- > A, EC- >D, A- >B. Which of the following is a key for R?

  5. Consider the relation T1(A,B,C,D,E) with the dependencies {EB ->C,D ->E, EA ->B} and T2(A,B,C,D) with the dependencies {C->A,A->B, A->D}. Which of the following is TRUE?

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