View Single Post

   
  #8 (permalink)  
Old 04-08-2008, 11:16 AM
David Newman
 
Posts: n/a
Default Re: Inserting a new PK into an existing table

"Mark D Powell" <Mark.Powell@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?

--
Dave Newman
Reply With Quote