Re: Separate foreign keys with shared ID space
Date: 1 Aug 2004 10:46:51 -0700
Message-ID: <910046b4.0408010946.4767bc37_at_posting.google.com>
Hans Forbrich <forbrich_at_yahoo.net> wrote in message news:<jZROc.2236$T_6.1453_at_edtnps89>...
> 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.
> >
> > Says who? Can you justify this statement?
>
> 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
-bdbafh Received on Sun Aug 01 2004 - 19:46:51 CEST