Multiple choice

Consider the following relation instance.

X Y Z 1 4 2 1 5 3 1 6 3 3 2 2

Which of the following functional dependencies are satisfied by the instance?

  1. XY$\rightarrow$Z and Z$\rightarrow$ Y
  2. YZ$\rightarrow$ X and Y$\rightarrow$ Z
  3. YZ$\rightarrow$ X and X$\rightarrow$ Z
  4. XZ$\rightarrow$ Y and Y$\rightarrow$ X
Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

A functional dependency (FD) is a constraint between two sets of attributes in a relation from a database. A FD X->Y require that the value of X uniquely determines the value of Y where X and Y are set of attributes. FD is a generalization of the notion of a key.Given that X, Y, and Z are sets of attributes in a relation R, one can derive several properties of functional dependencies. Among the most important are Armstrong’s axioms, which are used in database normalization:

  • Subset Property (Axiom of Reflexivity): If Y is a subset of X, then X ? Y
  • Augmentation (Axiom of Augmentation): If X -> Y, then XZ -> YZ
  • Transitivity (Axiom of Transitivity): If X -> Y and Y -> Z, then X -> Z From these rules, we can derive these secondary rules:
  • Union: If X -> Y and X -> Z, then X -> YZ
  • Decomposition: If X -> YZ, then X -> Y and X -> Z
  • Pseudotransitivity: If X -> Y and YZ -> W, then XZ -> W

In the above question, Y uniquely determines X and Z, for a given value of Y you can easily find out values of X and Z. So, Y -> X and Y -> Z hold for above schema. From rule of augmentation we can say YZ->X. If we understand the notion of FD, we don’t need to apply axioms to find out which option is true, just by looking at the schema and options we can say that (2) is true.