-2

I'm supposed to find the minimal cover for this set of FD's. Please let me know if my answer is correct.

  1. XZ->Z
  2. XZ->Y
  3. XZ->B
  4. YA->C
  5. YA->G
  6. C->W
  7. B->G
  8. XZ->G

My answer:

  1. X->Z (deleted Z attribute, trivial FD)
  2. Z->Y (deleted X, since it entails X->Z->Y from 1.)
  3. Z->B (same here)
  4. YA->C
  5. YA->G
  6. C->W
  7. B->G
  8. (Deleted, since X->Z->B->G)
Jk1
  • 11,233
  • 9
  • 54
  • 64
Leif
  • 177
  • 1
  • 5
  • 17

2 Answers2

1

It seem to me that the first one is not correct:

  • XZ->Z does not imply anything, since XZ contains Z, thus it is trivial.
zw324
  • 26,764
  • 16
  • 85
  • 118
  • So should I delete that dependency and leave X in 2. and 3.? Also should Y be deleted from 5. since XZ->Y->B? – Leif Aug 03 '11 at 02:51
  • @Leif I think so. You can look at the slide 12 (the rest might be helpful too) here: http://www.doc.ic.ac.uk/~pjm/db/fd-lecture.pdf – zw324 Aug 03 '11 at 02:54
  • 1. XZ->Y 2. XZ->B 3. YA->C 4. A->G 5. C->W 6. B->G I'm just confused about whether or not Y can be deleted from 4. if the implication is derived from XZ.. I'm thinking it should stay. – Leif Aug 03 '11 at 03:02
  • @Leif I think so too, since if Y is deleted then the dependency will not be able to construct from the set. Double check if this is homework, though:) – zw324 Aug 03 '11 at 03:07
0

X->Z (deleted Z attribute, trivial FD)

The trivial part of XZ->Z is Z->Z. I don't think you can derive X->Z from XZ->Z.

If #1 is wrong, this #2 and #3 are also wrong.

Numbers 4-7 in your answer are right. (Your answer that's inside your question, that is.)

From your comment to Ziyao Wei,

  1. XZ->Y 2. XZ->B 3. YA->C 4. A->G 5. C->W 6. B->G

Number 4 is wrong. Correct it, and you've found the minimal cover. Also, you said

I'm just confused about whether or not Y can be deleted from 4. if the implication is derived from XZ.

If you post your reasoning--how you derived A->G from XZ->Y and YA->C--then someone can probably show you where your reasoning went astray.

Mike Sherrill 'Cat Recall'
  • 91,602
  • 17
  • 122
  • 185