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.

Minimal cover F’ of functional dependency set F is

The correct answer is

F’ = {A → B, A → C, BC → D, D → E}

Understanding Minimal Cover for Functional Dependencies

In database theory, a minimal cover (also known as an irreducible set) of a set of functional dependencies (FDs) is a simplified set of FDs that is equivalent to the original set. Equivalent means that the closure of the original set is the same as the closure of the minimal cover. Finding a minimal cover is often the first step in the process of database normalization.

Properties of a Minimal Cover

A set of functional dependencies F’ is a minimal cover for F if it satisfies the following conditions:

  • Every functional dependency in F’ has a single attribute on its right-hand side.
  • No functional dependency can be removed from F’ without changing the closure of F’.
  • No attribute can be removed from the left-hand side of any functional dependency in F’ without changing the closure of F’.

Calculating the Minimal Cover Step-by-Step

We are given the initial set of functional dependencies \(F\):

\(F = \{A \rightarrow BC, D \rightarrow E, BC \rightarrow D, A \rightarrow D\}\)

The universal relation is \(R(A, B, C, D, E)\). We will follow the steps to find the minimal cover \(F'\).

Step 1: Splitting Right-Hand Sides

Break down functional dependencies that have multiple attributes on the right-hand side into separate functional dependencies with a single attribute on the right-hand side.

The FD \(A \rightarrow BC\) is split into \(A \rightarrow B\) and \(A \rightarrow C\).

The other FDs already have single attributes on the RHS.

The new set of functional dependencies, let's call it \(F_1\), is:

\(F_1 = \{A \rightarrow B, A \rightarrow C, D \rightarrow E, BC \rightarrow D, A \rightarrow D\}\)

Step 2: Removing Redundant Functional Dependencies

Check if any functional dependency in the current set \(F_1\) can be derived from the other functional dependencies in \(F_1\). If an FD can be derived, it is redundant and can be removed. To check if an FD \(X \rightarrow Y\) is redundant, compute the closure of \(X\) using all other FDs in the set. If \(Y\) is in the closure \(X^{+}\), then \(X \rightarrow Y\) is redundant.

Let's check each FD in \(F_1\):

  • Check \(A \rightarrow B\): Compute \((A)^{+}\) using \(\{A \rightarrow C, D \rightarrow E, BC \rightarrow D, A \rightarrow D\}\). \((A)^{+} = \{A, D, E\}\). B is not in \((A)^{+}\). So, \(A \rightarrow B\) is not redundant.
  • Check \(A \rightarrow C\): Compute \((A)^{+}\) using \(\{A \rightarrow B, D \rightarrow E, BC \rightarrow D, A \rightarrow D\}\). \((A)^{+} = \{A, D, E\}\). C is not in \((A)^{+}\). So, \(A \rightarrow C\) is not redundant.
  • Check \(D \rightarrow E\): Compute \((D)^{+}\) using \(\{A \rightarrow B, A \rightarrow C, BC \rightarrow D, A \rightarrow D\}\). \((D)^{+} = \{D\}\). E is not in \((D)^{+}\). So, \(D \rightarrow E\) is not redundant.
  • Check \(BC \rightarrow D\): Compute \((BC)^{+}\) using \(\{A \rightarrow B, A \rightarrow C, D \rightarrow E, A \rightarrow D\}\). \((BC)^{+} = \{B, C\}\). D is not in \((BC)^{+}\). So, \(BC \rightarrow D\) is not redundant.
  • Check \(A \rightarrow D\): Compute \((A)^{+}\) using \(\{A \rightarrow B, A \rightarrow C, D \rightarrow E, BC \rightarrow D\}\).
    • \((A)^{+} = \{A\}\)
    • Using \(A \rightarrow B\), \((A)^{+}\) becomes \(\{A, B\}\).
    • Using \(A \rightarrow C\), \((A)^{+}\) becomes \(\{A, B, C\}\).
    • Using \(BC \rightarrow D\), since B and C are in \((A)^{+}\), we can add D. \((A)^{+}\) becomes \(\{A, B, C, D\}\).
    • Using \(D \rightarrow E\), since D is in \((A)^{+}\), we can add E. \((A)^{+}\) becomes \(\{A, B, C, D, E\}\).

    Since D is in \((A)^{+}\) computed using the other FDs, the FD \(A \rightarrow D\) is redundant and can be removed.

The set of functional dependencies after removing the redundant FD \(A \rightarrow D\), let's call it \(F_2\), is:

\(F_2 = \{A \rightarrow B, A \rightarrow C, D \rightarrow E, BC \rightarrow D\}\)

Step 3: Removing Redundant Attributes from Left-Hand Sides

For each functional dependency \(X \rightarrow Y\) in \(F_2\) with a left-hand side \(X\) consisting of multiple attributes, check if any attribute can be removed from \(X\) without changing the closure. To check if an attribute \(A\) in \(X\) is redundant, compute the closure of \((X - \{A\})\) using all FDs in \(F_2\). If \(Y\) is in this closure \((X - \{A\})^{2}\), then \(A\) is redundant in \(X \rightarrow Y\).

In \(F_2\), only \(BC \rightarrow D\) has multiple attributes on the LHS.

  • Check \(BC \rightarrow D\):
    • Is B redundant? Check if \(C \rightarrow D\) is derivable from \(F_2\). Compute \((C)^{+}\) using \(F_2\). \((C)^{+} = \{C\}\). D is not in \((C)^{+}\). So B is not redundant in \(BC \rightarrow D\).
    • Is C redundant? Check if \(B \rightarrow D\) is derivable from \(F_2\). Compute \((B)^{+}\) using \(F_2\). \((B)^{+} = \{B\}\). D is not in \((B)^{+}\). So C is not redundant in \(BC \rightarrow D\).

The left-hand side of \(BC \rightarrow D\) is minimal. No attributes can be removed from the LHS of any FD in \(F_2\).

Final Minimal Cover and Conclusion

The set of functional dependencies after all steps is \(F_2\). This set satisfies all three properties of a minimal cover:

  • All FDs have a single attribute on the RHS.
  • No FD is redundant.
  • No attribute is redundant on the LHS of any FD.

Thus, the minimal cover \(F'\) is:

\(F' = \{A \rightarrow B, A \rightarrow C, BC \rightarrow D, D \rightarrow E\}\)

Comparing this with the given options, this matches the first option.

Steps to Find Minimal Cover
Step Action Resulting FD Set
Initial FDs Given \(F = \{A \rightarrow BC, D \rightarrow E, BC \rightarrow D, A \rightarrow D\}\)
Step 1 Split RHS (A → BC) \(F_1 = \{A \rightarrow B, A \rightarrow C, D \rightarrow E, BC \rightarrow D, A \rightarrow D\}\)
Step 2 Remove redundant FDs (A → D) \(F_2 = \{A \rightarrow B, A \rightarrow C, D \rightarrow E, BC \rightarrow D\}\)
Step 3 Minimize LHS (BC → D is already minimal) \(F' = \{A \rightarrow B, A \rightarrow C, BC \rightarrow D, D \rightarrow E\}\)

Revision Table: Functional Dependencies Concepts

Key Concepts in Functional Dependencies
Concept Description
Functional Dependency (FD) A constraint between two sets of attributes in a relation. \(X \rightarrow Y\) means that the value of \(X\) uniquely determines the value of \(Y\).
Closure of an Attribute Set (\(X^{+}\)) The set of all attributes that are functionally dependent on \(X\) under a given set of FDs.
Equivalence of FD Sets Two sets of FDs, \(F_1\) and \(F_2\), are equivalent if their closures are the same (\(F_{1}^{+} = F_{2}^{+}\)).
Minimal Cover An irreducible set of FDs that is equivalent to the original set, having single attributes on the RHS, no redundant FDs, and minimal LHSs.

Additional Information: Database Normalization Basics

Finding a minimal cover is a crucial step in database normalization. Normalization is a process used to organize columns (attributes) and tables (relations) in a relational database to reduce data redundancy and improve data integrity.

Different normal forms (like 1NF, 2NF, 3NF, BCNF) are defined based on the types of functional dependencies that hold in a relation.

  • First Normal Form (1NF): Attributes contain only atomic values.
  • Second Normal Form (2NF): A relation is in 1NF and all non-key attributes are fully functionally dependent on the primary key (no partial dependencies).
  • Third Normal Form (3NF): A relation is in 2NF and there are no transitive dependencies for non-key attributes.
  • Boyce-Codd Normal Form (BCNF): A stronger version of 3NF. For every non-trivial functional dependency \(X \rightarrow Y\) in the relation, \(X\) must be a superkey.

Understanding functional dependencies and how to find a minimal cover helps in decomposing relations into smaller, well-structured relations that are in higher normal forms, thereby improving the database design.

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. 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?
  4. Identify the redundant functional dependency in F

  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