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: Oracle Sequences

Re: Oracle Sequences

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Fri, 16 Jan 2004 08:09:15 -0800
Message-ID: <1074269281.541636@yasure>


Jawahar Rajan wrote:

> All,
> I am using Oracle sequences to generate the values for my ID Columns in most
> of the tables in my schema. The ID column itself is a Primary Key. IS this a
> good Idea?

> Many thanks
> Jawahar

No. Sometimes it is necessary but it should not be the first choice.

If there is a natural key ... use it. If not then a surrogate key is required. Remember that when you generate surrogate keys you leave yourself open to data integrity problems and to avoid them always end up building additional constraints with additional indexes that just add to system overhead.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Fri Jan 16 2004 - 10:09:15 CST

Original text of this message

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