Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How long is long enough for primary key ?
krislioe_at_gmail.com wrote:
> Hi,
>
> In our design, lookup tables (Customers, Products etc..) are using
> natural key as PK. We use VARCHAR2(30) as PK column.
>
> Is it too long ? How long is too long ?
>
> Thank you,
> xtanto
Length is irrelevant.
How many bytes is the data required to uniquely define a record?
The only thing that matters are:
First Normal Form:
Make a separate table for each set of related attributes and uniquely
identify each record with a primary key.
Second Normal Form
tables do not have composite primary keys
Third Normal Form
all non-key fields are dependent on the primary key
Everything else is window dressing related to performance. And you don't mention anything performance related in your inquiry.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Fri Oct 06 2006 - 23:29:13 CDT