Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Inserting a new PK into an existing table
David Newman wrote:
> "Mark D Powell" <Mark.Powell_at_eds.com> writes:
>
> > Jens Lenge wrote:
> >
> > Normally we use a business column or set of column values in the table
> > to be the PK and do not use an artificial key since if a unique
> > business value exists there is no need for or real use of an artificial
> > key.
> >
>
> This is an interesting subject to me. Normally I would fully agree with
> you. But I have been learning the Hibernate persistence library lately
> and they refer to this type of model, one in which actual business
> columns are used in the primary key, as "legacy" and not designed well
> and that an artificial primary key is always preferred. I've always
> felt that if you are going to have something in the table, like an
> employee id or SSN, that is going to have a unique constraint on it anyway
> you might as well make it the primary key. Is this some new way of
> thinking?
Agree with natual/surrogate post by Daniel - except, SSN is not guaranteed unique! (The problem really being insufficient analysis of natural keys).
jg
-- @home.com is bogus. http://dizwell.com/migforum/index.php?topic=189.0Received on Thu Aug 31 2006 - 16:13:41 CDT