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: Sequences as primary key experience?

Re: Sequences as primary key experience?

From: Marcus Reichardt <mr_at_diamanda.hh.eunet.de>
Date: Wed, 01 Jul 1998 15:02:03 +0200
Message-ID: <359A334B.13C0@diamanda.hh.eunet.de>


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

  1. Sequences are great if you are using just Oracle tools. If not, you might run into problems with tools, ODBC drivers etc. that do not support the special syntax. Using sequences might considerably increase migration afford to non-Oracle DBMSs, as it involves special CURVAL/NEXTVAL keywords and syntax, rather than just SELECTs of the next value from the sequence object in the database.
  2. Sequences cannot be used if you need a sequence without missing numbers, nor to indicate a particular order of assignment of keys to entities, which is sometimes desirable in accounting software.
  3. Sequences cannot be used for cascading keys, i.e. to compose a key from a "master" and a "sub" key.

Marcus Reichardt
Consultant Received on Wed Jul 01 1998 - 08:02:03 CDT

Original text of this message

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