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

Home -> Community -> Usenet -> c.d.o.server -> Re: primary key question

Re: primary key question

From: Ulrich Jank <ujank_at_gmx.net>
Date: 2000/03/26
Message-ID: <38DE31DB.2859C56B@gmx.net>#1/1

In the long term it could be easyer with sequences , imagine for example to use phone numbers as primary key. They are unique but anyway they can change . If you build up relations using pk's then you might have to change many records during this kind of update.EG contact person information and other related records.
There could be some other conflict , the key value itself might not be known when the user tries to put in the data . So the adress is known but for example not the phone number. So it depends on the data.

kal121_at_my-deja.com wrote:

> Is there any compelling reason(s) to use an artificially generated
> primary key, i.e. a sequence?
>
> I have a couple tables that have unique fields that would serve very
> well as primary keys, and would simplify some queries in the process.
>
> This may seem like a dumb question, but I'd like to know because all of
> the schemas I have ever seen *always* use sequences as a primary key.
> Also, using alternate keys as my primary key in only some tables would
> cause some tables to use sequences as primary keys, and some tables not.
> This causes me some vague discomfort for some reason. Maybe it is just
> aesthetics.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Sun Mar 26 2000 - 00:00:00 CST

Original text of this message

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