Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Separate foreign keys with shared ID space
Marshall Spight wrote:
> "Christian Antognini" <christian.antognini_at_trivadis.com> wrote in message
> news:410affcf$1_at_post.usenet.com...
>> >> A PK should have no business meaning.
A PK should be selected to uniquely identify an entity. Ideally, and by formal definition, the PK is invariant.
All to often a unique attribute of the entity, such as empno (or SSN/SIN or name or email address,) is used as the PK. Attributes generally have a business meaning. Such attributes can change, although some change very infrequently.
Selecting an attribute as the PK can cause DBAs (and/or developers and/or businesses) headaches when attempting to change the PK. This is especially true when taking the offline archives into account.
All of the examples are not invariant, although they tend not to change often. In some cases using the suggested PK is against the law (eg: SIN in Canada, has privacy implications).
Hans Received on Sat Jul 31 2004 - 13:58:23 CDT