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

Direction: Answer question based on the problem statement given below:

An organization needs to maintain database having five attributes A, B, C, D, E. These attributes the functionally dependent on each other for which functionally dependency set F is given as: F : (A → BC, D → E, BC → D, A → D}. Consider a universal relation R(A, B, C, D, E) with functional dependency set F. Also all attributes are simple and take atomic values only.

Identify the redundant functional dependency in F

The correct answer is

A → D

Identifying Redundant Functional Dependencies in Database Relations

In database design, understanding functional dependencies is crucial for normalization. A functional dependency (FD), denoted as $X \rightarrow Y$, means that the value of attribute set Y is uniquely determined by the value of attribute set X. A set of functional dependencies F is considered to have a redundant dependency if one of the dependencies in F can be logically derived from the other dependencies in the set F.

We are given a relation R(A, B, C, D, E) and a set of functional dependencies F:

  • FD1: A → BC
  • FD2: D → E
  • FD3: BC → D
  • FD4: A → D

To identify a redundant functional dependency, we need to check if the right-hand side (RHS) of any dependency can be derived from its left-hand side (LHS) using the closure operation on the set F *minus* that specific dependency. The closure of an attribute set X with respect to a set of FDs G, denoted $X^{+}_G$, is the set of all attributes that are functionally dependent on X based on the FDs in G.

Let's check each functional dependency for redundancy:

Checking A → BC for Redundancy

To check if A → BC is redundant in F, we need to see if BC can be derived from A using the set F' = F \ {A → BC} = {D → E, BC → D, A → D}. We compute the closure of A under F': $A^{+}_{F'}$.

  • Start with A. $A^{+}_{F'} = \{A\}$.
  • Using A → D (from F'), we add D. $A^{+}_{F'} = \{A, D\}$.
  • Using D → E (from F'), we add E. $A^{+}_{F'} = \{A, D, E\}$.
  • There are no other FDs in F' whose LHS is a subset of $\{A, D, E\}$.

So, $A^{+}_{F'} = \{A, D, E\}$. Since BC is not a subset of $\{A, D, E\}$, the functional dependency A → BC cannot be derived from the other FDs in F. Thus, A → BC is not redundant.

Checking D → E for Redundancy

To check if D → E is redundant in F, we need to see if E can be derived from D using the set F' = F \ {D → E} = {A → BC, BC → D, A → D}. We compute the closure of D under F': $D^{+}_{F'}$.

  • Start with D. $D^{+}_{F'} = \{D\}$.
  • There are no FDs in F' whose LHS is a subset of $\{D\}$.

So, $D^{+}_{F'} = \{D\}$. Since E is not in $\{D\}$, the functional dependency D → E cannot be derived from the other FDs in F. Thus, D → E is not redundant.

Checking BC → D for Redundancy

To check if BC → D is redundant in F, we need to see if D can be derived from BC using the set F' = F \ {BC → D} = {A → BC, D → E, A → D}. We compute the closure of BC under F': $(BC)^{+}_{F'}$.

  • Start with BC. $(BC)^{+}_{F'} = \{B, C\}$.
  • Using A → BC (from F'), we cannot add anything as A is not in $\{B, C\}$.
  • Using D → E (from F'), we cannot add anything as D is not in $\{B, C\}$.
  • Using A → D (from F'), we cannot add anything as A is not in $\{B, C\}$.

So, $(BC)^{+}_{F'} = \{B, C\}$. Since D is not in $\{B, C\}$, the functional dependency BC → D cannot be derived from the other FDs in F. Thus, BC → D is not redundant.

Checking A → D for Redundancy

To check if A → D is redundant in F, we need to see if D can be derived from A using the set F' = F \ {A → D} = {A → BC, D → E, BC → D}. We compute the closure of A under F': $A^{+}_{F'}$.

  • Start with A. $A^{+}_{F'} = \{A\}$.
  • Using A → BC (from F'), we add B and C. $A^{+}_{F'} = \{A, B, C\}$.
  • Using BC → D (from F'), we add D (since BC is a subset of $\{A, B, C\}$). $A^{+}_{F'} = \{A, B, C, D\}$.
  • Using D → E (from F'), we add E (since D is a subset of $\{A, B, C, D\}$). $A^{+}_{F'} = \{A, B, C, D, E\}$.

So, $A^{+}_{F'} = \{A, B, C, D, E\}$. Since D is in $\{A, B, C, D, E\}$, the functional dependency A → D can be derived from the other FDs in F. Thus, A → D is a redundant functional dependency.

Based on our checks, the functional dependency A → D is redundant because its RHS (D) can be derived from its LHS (A) using the other functional dependencies in the set F.

FD to Check F' (F \ {FD}) LHS Closure with F' RHS in Closure? Redundant?
A → BC {D→E, BC→D, A→D} $A^{+}_{F'} = \{A, D, E\}$ No (BC ¬⊆ $\{A, D, E\}$) No
D → E {A→BC, BC→D, A→D} $D^{+}_{F'} = \{D\}$ No (E ∉ $\{D\}$) No
BC → D {A→BC, D→E, A→D} $(BC)^{+}_{F'} = \{B, C\}$ No (D ∉ $\{B, C\}$) No
A → D {A→BC, D→E, BC→D} $A^{+}_{F'} = \{A, B, C, D, E\}$ Yes (D ∈ $\{A, B, C, D, E\}$) Yes

Revision Table: Key Concepts

Concept Explanation Relevance to Problem
Functional Dependency (FD) An assertion that states that one set of attributes ($X$) determines another set of attributes ($Y$), written as $X \rightarrow Y$. The problem is based on identifying a redundant FD within a given set.
Closure of an Attribute Set ($X^{+}$) The set of all attributes that are functionally determined by $X$ based on a given set of FDs. It's computed by repeatedly applying the FDs starting from $X$. Essential tool used to check if an FD's RHS can be derived from its LHS using other FDs.
Redundant Functional Dependency An FD $X \rightarrow Y$ in a set F is redundant if $Y \subseteq X^{+}_{F \setminus \{X \rightarrow Y\}}$. In other words, it can be derived from the other FDs in the set. The core task of the problem is to find such a dependency.

Additional Information: Functional Dependency and Database Normalization

Functional dependencies are fundamental to database normalization. Normalization is a process used to organize a database into tables in such a way that the results of data aggregation are unambiguous and information is also fully protected from certain kinds of logical inconsistencies, or anomalies.

  • Anomalies: Redundant FDs and poor design can lead to insertion, deletion, and update anomalies.
  • Minimal Cover: A related concept is a minimal cover for a set of FDs. A minimal cover is an equivalent set of FDs that has no redundant FDs, no redundant attributes in the LHS of any FD, and all LHSs consist of a single attribute if possible (though this last point is part of canonical cover, a minimal cover just requires minimality). Finding a redundant FD is a step towards finding a minimal cover.
  • Armstrong's Axioms: The rules for inferring new FDs from a given set are based on Armstrong's Axioms: Reflexivity, Augmentation, and Transitivity. The closure calculation implicitly uses these axioms.

Identifying and removing redundant functional dependencies helps in simplifying the set of dependencies and understanding the true constraints on the data, which is a necessary step before performing database normalization to forms like 3NF or BCNF.

Was this answer helpful?

Important Questions from Functional Dependency - Teaching

  1. Let R (ABCDEFGH) be a relation schema and F be the set of dependencies F = {A → B, ABCD → E, EF → G, EF → H and ACDF →EG}. The minimal cover of a set of functional dependencies is

  2. In a database, a rule is defined as (P1 and P2) or P3? R1 (0.8) and R2 (0.3), where P1, P2, P3 are premises and R1. R2 are conclusions of rules with certainty factors (CF) 0.8 and 0.3 respectively. If any running program has produced P1, P2, P3 with CF as 0.5, 0.8. 0.2 respectively, find the CF of results on the basis of premises.

  3. Minimal cover F’ of functional dependency set F is

  4. Assume that given table R is decomposed in two tables

    R 1(A, B, C) with functional dependency set f 1= {A → B, A → C} and R 2(A, D, E) with FD set F 2= {A → D, D → E}

    Which of the following option is true w.r.t. given decomposition?
  5. Identify primary key of table R with functional dependency set F

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