in Databases edited by
298 views
6 votes
6 votes

Consider the following database relation: $\mathrm{R}=(\mathrm{SFLNGCRW} \mathrm{H})=(\mathrm{S}$ : SID, F: First Name, L: Last Name, N: Number of Units, G: GPA, C: Course (of teaching), R: Rating for class, W: Wage, H: Hours per week of work)
 

Given the following set of functional dependencies (FDs): $F=\{S \rightarrow F L, S \rightarrow N G, S C \rightarrow R, C H \rightarrow W, F L \rightarrow$ $R, C \rightarrow H, H \rightarrow C\}$, which of the following additional FDs (added to the set in isolation from the other answer choices) would reduce the size of the candidate key if it were the only one applied?

  1. SID determines Rating
  2. Rating determines Wage
  3. Rating determines Course
  4. Rating and First Name determine Wage and Hours of Work
in Databases edited by
298 views

1 Answer

5 votes
5 votes
$SID$ already determines Rating because $S \rightarrow F L$ and $F L \rightarrow R$.

$R \rightarrow W$ does not help because Ratings and Wage do not appear on the left side of any existing FD. The current candidate key is $S C$, adding $R \rightarrow C$ means that $S \rightarrow C$, which reduces the candidate key to $S$

Similarly, $R F \rightarrow W H$ means that $S \rightarrow H$ (and $H \rightarrow C$ is given) which reduces the candidate key to $S$ again!
edited by

1 comment

Good question
0
0