Re: thinking about UPDATE

From: Jan Hidders <jan.hidders_at_REMOVETHIS.pandora.be>
Date: Fri, 23 Jul 2004 08:57:52 GMT
Message-Id: <pan.2004.07.23.08.58.40.657256_at_REMOVETHIS.pandora.be>


On Fri, 23 Jul 2004 08:08:32 +0000, Dan wrote:
>
> I don't know if you have your Date *_Intro to database systems_* book handy
> (7th Ed), but if you do, perhaps you could check out problem 10.7 on page
> 341 (the answer is on page 344). The question is phrased as, "List all the
> FDs satisfied by the shipments relvar SP."
>
> To give an indication, part of the answer goes something like this:
>
> {S#} -> {S#}
> {S#} -> {}
>
> {P#} -> { P#}
> {P#} -> {}
>
> { QTY } -> { QTY }
> { QTY } -> {}
>
> {} -> {}
>
> The last is the only time an empty set is on the LHS and is has one and only
> one result, the empty set.

FDs of the form {}->Y are very strong statements and therefore rarely true. If it would hold that {}->{QTY} then there can be at most one value in the QTY column. If it would hold that {}->{P#} then there can be at most one value in the P# column. Since {}->{P#,QTY} is essentially the conjunction of the previous two, that's an even stronger statement: every shipment contains the same part in the same quantity.

Note that in practice you would probably not include such columns because they are obviously redundant. Actually, theory says the same because the relation would not be in 3NF (or even 2NF).

  • Jan Hidders
Received on Fri Jul 23 2004 - 10:57:52 CEST

Original text of this message