Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: null as part of key?
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
![]() |
![]() |