Re: Extending my question. Was: The relational model and relational

From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Mon, 17 Feb 2003 16:26:10 -0800
Message-ID: <0af4a.17$7H6.157_at_news.oracle.com>


"Bernard Peek" <bap_at_shrdlu.com> wrote in message news:JyMJPSAtcXU+EwSH_at_diamond9.demon.co.uk...
> I collect books and as sometimes happens I have some duplicates. I have
> two copies of the same book, quite often both of them in mint condition.
> I have two database entries for that edition. I have two copies of the
> book on the shelf. Suppose I give one copy away? I take one copy off of
> the shelf and I delete one record from the database.
>
> It makes no difference whether I delete the record that was created when
> I acquired the first book or the second. It makes no difference whether
> I remove the first book or the second.
>
> I could create a new entity and call it "Acquisition Number" and that's
> what most librarians do. Acquisition numbers are simply identity fields.
> They should not be considered part of the logical data structure.

Again, the standard answer to this example is "add a #copies column". Your design with multisets is equivalent to saying "I want quantity -- that is #copies -- to be in base-1 system. Base-1 system is especially convenient for additions and subtractions -- that makes insertions and deletions trivial". Received on Tue Feb 18 2003 - 01:26:10 CET

Original text of this message