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: Why Oracle don't have AUTO_INCREMENT as in MySQL

Re: Why Oracle don't have AUTO_INCREMENT as in MySQL

From: Galen Boyer <galen_boyer_at_yahoo.com>
Date: 24 Apr 2007 21:36:09 -0500
Message-ID: <u1wi90zq5.fsf@rcn.com>


On Mon, 23 Apr 2007, damorgan_at_psoug.org wrote:
> Galen Boyer wrote:
>

>>> If a developer can't handle
>>>
>>> INSERT INTO t
>>> (idcol)
>>> VALUES
>>> (idseq.NEXTVAL);
>>>
>>> Then they should learn to say 'do you want fries with that'.
>>>
>>> I hate to be a bit harsh here but it isn't exactly like asking
>>> them to step up to a real hardship like curly braces or assembler.
>> Daniel, You are just being completely disingenuous.  As the codebase
>> grows and grows, it would be quite easy for even a very experienced
>> developer to call the wrong sequence and it could take awhile before
>> it might get uncovered.  The less you have to manually tie things
>> with code, the better.  Thats just plain common-sense.

>
> Not disingenuous ... humorous (I hoped).
>
> Of course it possible to make mistakes. It is possible to update the
> wrong column. It is possible to assign a value to the wrong variable.
> It is possible to log onto prod and truncate a table thinking it was
> test (ask me how I know <g>).
>
> That is a good reason to have code reviews.
> That is a good reason to have a test cycle.
> That is not a good reason for autoincrementing columns.

But, this is why you are disingenuous. You said you didn't like the SQLServer/Sybase autoincrementing column because of the way it is implemented in those engines, not the way it is used.

Or, are you saying that having a surrogate key is a problem. If not, then what is the issue with autoincrementing?

-- 
Galen Boyer
Received on Tue Apr 24 2007 - 21:36:09 CDT

Original text of this message

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