Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sequences as primary key experience?
Jackie Marino wrote:
> Does anyone have any advice/experience on using sequences as primary
> keys? We are going to use them for almost all of our tables and would
> like to know any potential problems.
>
> Thanks in advance,
> Jackie Marino
If the table already has a clear primary key, then why not use it ??
Any additional
column you add takes up space.
On a purely practical viewpoint, a database which consists primarily of
surrogate
keys is much more difficult for people new to the schema to understand.
You also make 'short-cut joins' much more difficult .
eg customer, order, order-line
to get all order-lines for a customer means a three-table join. If the
key of
order-line is defined as cust-id, ord_id, ord_line_no then the primary
key
index of the order line immediatly gives the required rows with no joins.
Simon. Received on Wed Jul 01 1998 - 16:46:08 CDT
![]() |
![]() |