Re: Does entity integrity imply entity identity?

From: Nilone <reaanb_at_gmail.com>
Date: Thu, 6 Aug 2009 10:44:27 -0700 (PDT)
Message-ID: <0735720c-bacc-46f1-b60d-5df101ad3810_at_v2g2000vbb.googlegroups.com>


On Aug 6, 2:42 pm, "Mr. Scott" <do_not_re..._at_noone.com> wrote:
> "Mr. Scott" <do_not_re..._at_noone.com> wrote in message
>
> news:BPadnZQTbZN6EefXnZ2dnUVZ_tadnZ2d_at_giganews.com...
>
>
>
>
>
> > "Bob Badour" <bbad..._at_pei.sympatico.ca> wrote in message
> >news:4a7a425c$0$23748$9a566e8b_at_news.aliant.net...
> >> Mr. Scott wrote:
>
> >>> "Bob Badour" <bbad..._at_pei.sympatico.ca> wrote in message
> >>>news:4a7a22e9$0$23782$9a566e8b_at_news.aliant.net...
>
> >>>>Bob Badour wrote:
>
> >>>>>Mr. Scott wrote:
>
> >>>>>>"Bob Badour" <bbad..._at_pei.sympatico.ca> wrote in message
> >>>>>>news:4a799414$0$23781$9a566e8b_at_news.aliant.net...
>
> >>>>>>>Mr. Scott wrote:
>
> >>>>>>>>"Bob Badour" <bbad..._at_pei.sympatico.ca> wrote in message
> >>>>>>>>news:4a784836$0$23766$9a566e8b_at_news.aliant.net...
>
> >>>>>>>>>Mr. Scott wrote:
>
> >>>>>>>>>>>The entity integrity rule is generally presented as a subrule
> >>>>>>>>>>>under Codd's rule 10.
>
> >>>>>>>>>I don't know why you would say that when the description of the
> >>>>>>>>>so-called "entity integrity" basically restates Rule 2 verbatim.
>
> >>>>>>>>I don't think that's true.  Although the entity integrity rule
> >>>>>>>>implies the guaranteed access rule, the guaranteed access rule
> >>>>>>>>doesn't imply the entity integrity rule.  The guaranteed access rule
> >>>>>>>>doesn't say anything at all about nulls.
>
> >>>>>>>As Martha would say: This is a good thing. Null was a bad idea in the
> >>>>>>>first place.
>
> >>>>>>Why was it a bad idea?
>
> >>>>>Entire books have been written on that subject. I suggest you read one
> >>>>>or two of them. See for example Date's various _Writings..._ books.
>
> >>>>>>Is there a reasonable alternative?
>
> >>>>>Yes. Nothing at all is a reasonable alternative to anything as bad as
> >>>>>null. If it ain't broken, don't try to fix it. If it is broken, don't
> >>>>>break it worse.
>
> >>>>Perhaps I should clarify: Your question amounts to asking if one has a
> >>>>reasonable alternative to poking oneself in the eye with an icepick.
>
> >>> If the requirement is to record in the database as much information as
> >>> is available, then how can the fact that a value is at present unknown
> >>> be recorded?
>
> >> By stating so in the database. That's what relations do: make statements.
>
> > How, exactly?  If you have columns K, A, B, and C such that for a given K
> > it is permissible for the values for A, B or C to be at present unknown,
> > but not both A and B, how would you lay out the tables and referential
> > constraints without using nulls?
>
> Here's a more concrete example.  Software can be delivered to a customer
> over the internet or through the mail or both, but in order to deliver over
> the internet there must be an e-mail address, and in order to deliver
> through the mail there must be a snail-mail address.  There may also be a
> delivery contact phone number.  So for a given order K, there must be at
> least one of an e-mail address A or a snail-mail address B, and there may be
> a delivery phone number C.

Three separate relations: {K -> A}, {K -> B}, {K -> C}. It doesn't enforce the requirement for at least A or B, but neither does {K -> A, B, C} where A, B and C are nullable. Received on Thu Aug 06 2009 - 19:44:27 CEST

Original text of this message