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

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?

Understanding Functional Dependency Properties

We analyze each option based on the properties of functional dependencies (FDs) in relational databases. Let the relation schema have attributes $P, Q, R, S$. $X \rightarrow Y$ denotes a functional dependency, where $X, Y \subseteq \{P, Q, R, S\}$.

Option 1 Analysis: $(\{P, Q\} \rightarrow \{R\} \text{ and } \{P\} \rightarrow \{R\}) \implies \{Q\} \rightarrow \{R\}$

This statement is false. We can demonstrate this with a counterexample.

Consider a relation instance with the following tuples:

  • $(p1, q1, r1)$
  • $(p1, q2, r1)$
  • $(p2, q1, r2)$

Let's check the conditions:

  • Check $\{P\} \rightarrow \{R\}$: The value $p1$ maps only to $r1$. The value $p2$ maps only to $r2$. So, $\{P\} \rightarrow \{R\}$ holds.
  • Check $\{P, Q\} \rightarrow \{R\}$: The combination $(p1, q1)$ maps to $r1$. The combination $(p1, q2)$ maps to $r1$. The combination $(p2, q1)$ maps to $r2$. Each combination of $P$ and $Q$ maps to a single value of $R$. So, $\{P, Q\} \rightarrow \{R\}$ holds.

Now, let's check the conclusion:

  • Check $\{Q\} \rightarrow \{R\}$: The value $q1$ appears with $p1$ (mapping to $r1$) and with $p2$ (mapping to $r2$). Since $q1$ maps to different values ($r1$ and $r2$), $\{Q\} \rightarrow \{R\}$ does not hold.

Since the premise holds but the conclusion does not, this option is not always true.

Option 2 Analysis: $\{P, Q\} \rightarrow \{R\} \implies (\{P\} \rightarrow \{R\} \text{ or } \{Q\} \rightarrow \{R\})$

This statement is false. A counterexample requires $\{P, Q\} \rightarrow \{R\}$ to be true, while *both* $\{P\} \rightarrow \{R\}$ and $\{Q\} \rightarrow \{R\}$ are false.

Consider the following relation instance:

  • $(p1, q1, r1)$
  • $(p1, q2, r2)$
  • $(p2, q1, r3)$
  • $(p2, q2, r4)$

Let's check the conditions:

  • Check $\{P, Q\} \rightarrow \{R\}$: Each unique pair of $(P, Q)$ values corresponds to a unique $R$ value. This FD holds.
  • Check $\{P\} \rightarrow \{R\}$: $P$ value $p1$ corresponds to $R$ values $r1$ and $r2$. This FD does not hold.
  • Check $\{Q\} \rightarrow \{R\}$: $Q$ value $q1$ corresponds to $R$ values $r1$ and $r3$. This FD does not hold.

Since $\{P\} \rightarrow \{R\}$ is false and $\{Q\} \rightarrow \{R\}$ is false, the conclusion $(\{P\} \rightarrow \{R\} \text{ or } \{Q\} \rightarrow \{R\})$ is false. The premise is true, but the conclusion is false, so this option is not always true.

Option 3 Analysis: $(\{P\} \rightarrow \{R\} \text{ and } \{Q\} \rightarrow \{S\}) \implies \{P, Q\} \rightarrow \{R, S\}$

This statement is true. This is a standard property derived from Armstrong's axioms, often proven using the augmentation and union rules.

Derivation:

  1. $\{P\} \rightarrow \{R\}$ (Given)
  2. $\{Q\} \rightarrow \{S\}$ (Given)
  3. From (1), using the rule $X \rightarrow Y \implies XZ \rightarrow Y$, we get $\{P, Q\} \rightarrow \{R\}$.
  4. From (2), using the rule $X \rightarrow Y \implies XZ \rightarrow Y$, we get $\{P, Q\} \rightarrow \{S\}$.
  5. Now we have $\{P, Q\} \rightarrow \{R\}$ and $\{P, Q\} \rightarrow \{S\}$.
  6. Using the Union rule (If $X \rightarrow Y$ and $X \rightarrow Z$, then $X \rightarrow YZ$), we combine the results from step 3 and 4: $\{P, Q\} \rightarrow \{R, S\}$.

Therefore, this option is always true.

Option 4 Analysis: $\{P\} \rightarrow \{R\} \implies \{P, Q\} \rightarrow \{R\}$

This statement is true. This property follows directly from the definition of functional dependency and can be proven using Armstrong's axioms.

Proof by contradiction:

  1. Assume $\{P\} \rightarrow \{R\}$ holds.
  2. Assume $\{P, Q\} \rightarrow \{R\}$ does not hold.
  3. If $\{P, Q\} \rightarrow \{R\}$ does not hold, there exist two tuples $t_1$ and $t_2$ such that $t_1.P = t_2.P$ and $t_1.Q = t_2.Q$, but $t_1.R \neq t_2.R$.
  4. Let $t_1.P = t_2.P = p$.
  5. From the initial assumption (1), since $t_1.P = t_2.P$, it must be that $t_1.R = t_2.R$.
  6. This contradicts the condition $t_1.R \neq t_2.R$ derived from the assumption that $\{P, Q\} \rightarrow \{R\}$ does not hold.
  7. Therefore, the assumption (2) that $\{P, Q\} \rightarrow \{R\}$ does not hold must be false. Hence, $\{P, Q\} \rightarrow \{R\}$ must be true if $\{P\} \rightarrow \{R\}$ is true.

This demonstrates the Augmentation property where adding attributes to the determinant does not invalidate a dependency if the original determinant alone determines the dependent attributes.

Therefore, this option is always true.

Conclusion

Based on the analysis, options 3 and 4 are the statements that are always true regarding functional dependencies.

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. 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 ?
  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