edited by
14,531 views
30 votes
30 votes

Given the following relation instance.

$$\begin{array}{|l|l|}\hline \text{X} & \text{Y} & \text{Z} \\\hline   \text{1} & \text{4} & \text{2} \\   \text{1} & \text{5} & \text{3} \\  \text{1} & \text{6} & \text{3} \\ \text{3} & \text{2} & \text{2} \\\hline \end{array}$$

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$
edited by

5 Answers

Best answer
40 votes
40 votes

(b) is answer.

If $A\to B$ then for each same value of $A$, $B$ value should be same. If all the $A$ values are distinct the FD hold irrespective of the $B$ values.

Since all $Y$ values are distinct FDs with $Y, YX$ and $YZ$ on LHS hold. So, option $B$ is correct. 

In option A, $Z \to Y$ is violated as for same $Z$ value we have different $Y$ values. 
Similarly in C, $X \to Z$ is violated and in D, $XZ \to Y$ is violated.

edited by
17 votes
17 votes

Option B is correct.

a functional dependency A \rightarrow B is said to hold if for two tuples t1 and t2 . If for t1[A] = t2[A] then t1[Y] = t2[Y].

Here we can manually check for each option with the given instance and option B satisfies

Answer:

Related questions

35 votes
35 votes
5 answers
2
29 votes
29 votes
2 answers
3
Kathleen asked Sep 14, 2014
14,922 views
The value of $j$ at the end of the execution of the following C program:int incr (int i) { static int count = 0; count = count + i; return (count); } main () { int i, j; ...
41 votes
41 votes
5 answers
4