Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Primary Key of type string ?

Re: Primary Key of type string ?

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Thu, 31 May 2007 19:28:03 +0200
Message-ID: <f3n0j3$e6$1@news2.zwoll1.ov.home.nl>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Walt wrote:
[snip!]
> Except for simple small code tables, use an ordinal (Number(10) is
> good), generated by a sequence. Do not put "meaningful" data in your
> primary key, because everything that has external meaning is subject to
> change and should be an attribute, not a key.
>
> A classic example is Social Security Number - if you've used that as a
> primary key for your person table, you're in a world of hurt.
>
> //Walt

As you pointed out: the values, that make up primary key columns, should never change. I'd like to add: they should be unique.

Not sure about US based SSN's, but the Dutch counterpart sure ain't unique for reasons that make me doubt is SSN's are.

Top-posting is one way to shut me up...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)

iD8DBQFGXwWjLw8L4IAs830RAudzAJ9K1U/N2K814wxSuoH5veTWDppoJACfQ1vj Xx2FQ295Qu6px6KVRsC3qGI=
=p1R9
-----END PGP SIGNATURE----- Received on Thu May 31 2007 - 12:28:03 CDT

Original text of this message

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