user8716582
user8716582

Reputation:

Functional Dependencies clarification

If I have XY->Z is it true that we can infer that X->Z because:

XY->ZY so

XY->Z and XY->Y

XY->Y can be decomposed to X->Y

and since X->Y we can decompose XY->Z to X->Z

Is this correct?

Upvotes: 0

Views: 36

Answers (1)

Jonathan Leffler
Jonathan Leffler

Reputation: 753585

No, it isn't correct. It would mean that there can never be a compound key.

Consider X = order number, Y = order item number, and Z = item price. If your reduction was correct, the order number alone would determine the item price, but in most order systems, there can be multiple items in an order with different item prices. It makes sense for XY⟶Z, but X⟶Z is fallacious in general.

Upvotes: 2

Related Questions