Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Re[3]: How do you generate primary keys?

Re: Re[3]: How do you generate primary keys?

From: Tanel Poder <tanel.poder.003_at_mail.ee>
Date: Sun, 09 Nov 2003 15:24:25 -0800
Message-ID: <F001.005D6253.20031109152425@fatcity.com>


I think this is a high-level design and even analysis issue in many cases. If no gaps are allowed, you probably should allocate a key value for any record just before committing the transaction (commiting has wider meaning here, e.g. accepting or permanently storing). That way you won't get problems with rollbacks, but of course in some environments you have to know your keys ID before you commit or IDs should be allocated based on transaction start time etc. In these cases you have to do some kind of tradeoff between performance and key "quality" and these kind of decisions should be done as early as possible, in analysis/design stage.

Tanel.

> Wednesday, November 5, 2003, 1:14:26 PM, Jamadagni, Rajendra
(Rajendra.Jamadagni_at_espn.com) wrote:
> JR> hypothetically, When you have a requirement that no gaps allowed in a
sequence no matter what,
> JR> would you still use sequences?
>
> Ah! This is a good question. If no gaps are acceptable,
> period, end of story, then what is a viable solution? I do
> not think sequences are it.
>
> Best regards,
>
> Jonathan Gennick --- Brighten the corner where you are
> http://Gennick.com * 906.387.1698 * mailto:jonathan@gennick.com
>
> Join the Oracle-article list and receive one
> article on Oracle technologies per month by
> email. To join, visit

http://four.pairlist.net/mailman/listinfo/oracle-article,
> or send email to Oracle-article-request_at_gennick.com and
> include the word "subscribe" in either the subject or body.
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Jonathan Gennick
> INET: jonathan_at_gennick.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Tanel Poder
  INET: tanel.poder.003_at_mail.ee

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Sun Nov 09 2003 - 17:24:25 CST

Original text of this message

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