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: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 31 May 2007 10:27:52 -0700
Message-ID: <1180632470.477490@bubbleator.drizzle.com>


Oriane wrote:
> Hi there,
>
> Just a basic question from a beginner in Oracle. Is is the "standard
> choice" to use a column of type "int" for the primary key ? I suppose
> that this is a performance issue ? What about choosing a type
> "string/char" for a primary key ?
>
> Sincerely
>
> Oriane

There is no such thing as a standard choice.

You appear to be thinking all primary keys are surrogate keys and, perhaps, every database is MS Access. Both assumptions being incorrect.

The choice of a key is ALWAYS based on the business rules. And most people prefer natural keys when they are available to avoid the introduction of duplicate rows.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Thu May 31 2007 - 12:27:52 CDT

Original text of this message

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