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: forcing the developers to use sequences

Re: forcing the developers to use sequences

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Fri, 12 Dec 2003 21:08:28 -0500
Message-ID: <a0tktvg3ik765nc8kqld9k7843qvp213jg@4ax.com>


On Fri, 12 Dec 2003 12:06:09 -0500, Phil <phil_at_nospamthanks.com> wrote:

>The problem with using a trigger to populate the column is that it
>doesn't educate the programmers as what the proper solution is, as you
>have indicated.

I'd use a trigger, at least I'd strongly consider using a trigger, not so much to *force* the developers, but to avoid leaving open the hole whereby someone inadvertently doesn't use the sequence, because if that happens, and the sequence eventually hits the value that was inadvertently used, you could get a primary key violation, and you, the DBA, would need to adjust the sequence.

There may be reasons not to use a trigger, but if it was important that the column always be populated from a trigger, I'd sure try and centralize that functionality in the database.

Jonathan Gennick --- Brighten the corner where you are http://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. Received on Fri Dec 12 2003 - 20:08:28 CST

Original text of this message

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