Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: null as part of key?

Re: null as part of key?

From: ed zappulla <zappullae_at_rcn.com>
Date: Tue, 23 Oct 2001 11:36:49 -0400
Message-ID: <9r42mp$jv0$1@bob.news.rcn.net>


many countries do not have postal codes. Ireland for one.

country, state, city is the proper key with a null state being valid.

"Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> wrote in message news:3bd532bc$0$232$ed9e5944_at_reading.news.pipex.net...
> Comments below
> "ed zappulla" <zappullae_at_rcn.com> wrote in message
> news:9r1eih$aiq$1_at_bob.news.rcn.net...
> > I see. What about this case
> >
> > country
> > state
> > city
> > some other cols
> >
> > pk = country, state, city
>
> Doesn't look like a good primary key candidate to me. Does
> country,state,city really uniquely identify the record? Postal code would
be
> a more likely meaningful key, or has been suggested use a sequence as a
> meaningless key.
> >
> > Some contries don't have states; therefore it would be null for those
> > countries.
> >
> > does this make sense?
>
> No. Null means value unknown NOT no value. Therefore if you are going to
> account for the situation you describe you should use some other
alternative
> "none" or "N/A" spring to mind. You do know that there is no value for
state
> in this record.
>
>
> --
> Niall Litchfield
> Oracle DBA
> Audit Commission UK
>
>
Received on Tue Oct 23 2001 - 10:36:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US