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: Marc Blum <marc_at_marcblum.de>
Date: Mon, 22 Oct 2001 16:56:04 GMT
Message-ID: <3bd44f1c.1260402@news.online.de>


On Mon, 22 Oct 2001 11:40:57 -0400, "ed zappulla" <zappullae_at_rcn.com> wrote:

>I see. What about this case
>
>country
>state
>city
>some other cols
>
>pk = country, state, city
>
>Some contries don't have states; therefore it would be null for those
>countries.
>
>does this make sense?
>
>

(1) use a distinct key like 'none' as state for countries without states

(2) use a generated ID as primary key and make (country,state,city) unique, which is possible

regards
Marc Blum
mailto:marc_at_marcblum.de
http://www.marcblum.de Received on Mon Oct 22 2001 - 11:56:04 CDT

Original text of this message

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