Re: foundations of relational theory?
Date: Sun, 26 Oct 2003 18:07:41 -0500
Message-ID: <3F9C53BD.4030006_at_quest.with.a.w.net>
Marshall Spight wrote:
> "Anthony W. Youngman" <thewolery_at_nospam.demon.co.uk> wrote in message
> news:Ko91hKAyFDj$EwOn_at_thewolery.demon.co.uk...
>
>> My favourite example is always to quote an invoice. How many tables
>> do you need in a relational database? One for the invoice itself,
>> one for the addresses (two at least, billing and shipping), one for
>> the line detail, a couple maybe for the relationships ...
>
>
> For some customers, ship-to and bill-to are the same address. For
> others, they are not the same. Let's say you discover that a street
> name is misspelled on the ship-to address for a customer. You update
> the record. If ship-to and bill-to are the same address, do you have
> to do another update? Is it possible to have the two addresses
> out-of-sync, even though, for this customer, they are the same
> address?
>
Yes to the last; the inegrity is up to the application. No to having to
do another update; typically the two addresses are in the same record
(row) and read/written simultaneously. From an application viewpoint,
it'd be easy to set a flag indicating ship-to=bill-to and not redunantly
store the address, so out-of-synch wouldn't happen.
Chandru Murthi Received on Mon Oct 27 2003 - 00:07:41 CET
