| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Artificial Primary keys
In message <3c505454$0$89112$edfadb0f_at_dspool01.news.tele.dk>, Jan Emil
Larsen <jel_at_g-it.dk> writes
>
>"Bernard Peek" <bap_at_shrdlu.com> skrev i en meddelelse
>news:1RWc$oFw4BU8Ew$$@shrdlu.com...
>> In message <3c4f3e5e$0$13976$edfadb0f_at_dspool01.news.tele.dk>, Jan Emil
>> Larsen <jel_at_g-it.dk> writes
>>
>> >A key should be imutable, and should therefore be without information in
>it
>> >self.
>>
>> The first is true but the second doesn't follow from it.
>
>That is right. I goes the other way round: If it has information in it self,
>it may change.
>No-information in the key is a measure to secure immutability.
No, that's still not right. Immutability is important but artificial keys are not the only way to get it. If you have a natural key that truly identifies one and only one thing then it is immutable. If it changes then either it wasn't a real key or someone recorded the wrong value.
>
>>You should
>> definitely try as hard as you can to have an immutable primary key but
>> where possible it should be immutable because the data in it really does
>> identify one and only one thing.
>
>Agreed. A key should identify one and only one thing (an entity; or the
>table at BCNF)
>
>>It's only when you don't have such a
>> key that you need an artificial one.
>
>Yes, but that happens quite often.
Not when you have a natural key.
-- Bernard Peek bap_at_shrdlu.com In search of cognoscentiReceived on Fri Jan 25 2002 - 07:01:44 CST
![]() |
![]() |