Unix Technical Forum

Why Oracle don't have AUTO_INCREMENT as in MySQL

This is a discussion on Why Oracle don't have AUTO_INCREMENT as in MySQL within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Seems AUTO_INCREMENT is very handy and natural, anyone agree?...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 12:35 PM
howa
 
Posts: n/a
Default Why Oracle don't have AUTO_INCREMENT as in MySQL

Seems AUTO_INCREMENT is very handy and natural, anyone agree?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 12:35 PM
sybrandb@hccnet.nl
 
Posts: n/a
Default Re: Why Oracle don't have AUTO_INCREMENT as in MySQL

On 14 Apr 2007 06:27:46 -0700, "howa" <howachen@gmail.com> wrote:

>Seems AUTO_INCREMENT is very handy and natural, anyone agree?


No. Oracle has something called SEQUENCE which isn't bound to any
column, or table. THIS is very handy.

--
Sybrand Bakker
Senior Oracle DBA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 12:35 PM
Mark D Powell
 
Posts: n/a
Default Re: Why Oracle don't have AUTO_INCREMENT as in MySQL

On Apr 14, 9:58 am, sybra...@hccnet.nl wrote:
> On 14 Apr 2007 06:27:46 -0700, "howa" <howac...@gmail.com> wrote:
>
> >Seems AUTO_INCREMENT is very handy and natural, anyone agree?

>
> No. Oracle has something called SEQUENCE which isn't bound to any
> column, or table. THIS is very handy.
>
> --
> Sybrand Bakker
> Senior Oracle DBA


I agree with Sybrand. As someone who every now and then has to work
with SQL Server the auto-increment feature which has its advantages
also has its fair share of disadvantages when dealing with the row
data.

IMHO -- Mark D Powell --


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 12:35 PM
DA Morgan
 
Posts: n/a
Default Re: Why Oracle don't have AUTO_INCREMENT as in MySQL

howa wrote:
> Seems AUTO_INCREMENT is very handy and natural, anyone agree?


No. Autoincrement is a brain-damaged way of creating surrogate
keys.

I will grant it may be handy.
But then so are a lot of other bad habits.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-08-2008, 12:35 PM
Galen Boyer
 
Posts: n/a
Default Re: Why Oracle don't have AUTO_INCREMENT as in MySQL

On Sat, 14 Apr 2007, damorgan@psoug.org wrote:
> howa wrote:
>> Seems AUTO_INCREMENT is very handy and natural, anyone agree?


Has its merit. I like the way sequences are not tied to a single
table. Gives one much more flexibility.


> No. Autoincrement is a brain-damaged way of creating surrogate
> keys.


And what, may I ask, is the non-brain damaged way of using sequences?

--
Galen Boyer
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-08-2008, 12:35 PM
howa
 
Posts: n/a
Default Re: Why Oracle don't have AUTO_INCREMENT as in MySQL

> No. Oracle has something called SEQUENCE which isn't bound to any
> column, or table. THIS is very handy.
>
> --
> Sybrand Bakker
> Senior Oracle DBA


i agreed SEQUENCE is flexible, but in 99% of my applications,
AUTO_INCREMENT is far than enough.

so i just wonder why Oracle implements like this.

i heard before using SEQUENCE will have some benefits related to
performance, but i forgot...

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-08-2008, 12:35 PM
Fuzzy
 
Posts: n/a
Default Re: Why Oracle don't have AUTO_INCREMENT as in MySQL

On Apr 14, 7:27 am, "howa" <howac...@gmail.com> wrote:
> Seems AUTO_INCREMENT is very handy and natural, anyone agree?


Seems SEQUENCE is very handy and natural. Why don't others implement
SEQUENCE?

/Hans

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-08-2008, 12:35 PM
howa
 
Posts: n/a
Default Re: Why Oracle don't have AUTO_INCREMENT as in MySQL

On 4月15日, 下午12時04分, "Fuzzy" <fuzzy.greybe...@gmail.com> wrote:
> On Apr 14, 7:27 am, "howa" <howac...@gmail.com> wrote:
>
> > Seems AUTO_INCREMENT is very handy and natural, anyone agree?

>
> Seems SEQUENCE is very handy and natural. Why don't others implement
> SEQUENCE?
>
> /Hans


I can't agree SEQUENCE is more handy than AUTO_INCREMENT as you need
to do the same thing by two statements.

Also, in real world, use of AUTO_INCREMENT as primary key (e.g. id) is
in fact, quite intuitive.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-08-2008, 12:35 PM
sybrandb@hccnet.nl
 
Posts: n/a
Default Re: Why Oracle don't have AUTO_INCREMENT as in MySQL

On 15 Apr 2007 01:12:05 -0700, "howa" <howachen@gmail.com> wrote:

>On 4??15??, ?U??12??04??, "Fuzzy" <fuzzy.greybe...@gmail.com> wrote:
>> On Apr 14, 7:27 am, "howa" <howac...@gmail.com> wrote:
>>
>> > Seems AUTO_INCREMENT is very handy and natural, anyone agree?

>>
>> Seems SEQUENCE is very handy and natural. Why don't others implement
>> SEQUENCE?
>>
>> /Hans

>
>I can't agree SEQUENCE is more handy than AUTO_INCREMENT as you need
>to do the same thing by two statements.
>
>Also, in real world, use of AUTO_INCREMENT as primary key (e.g. id) is
>in fact, quite intuitive.
>


My, my, typing two statements instead of one! What a problem!
SEQUENCE is quite handy, as it is allows for multiple, similar tables
with ONE surrogate.
Also, in real world, AUTO_INCREMENT is equally artificial as SEQUENCE.

But if you want to stick to Mickeysoft products, and don't want to
admit the Oracle solution is better, you are by all means invited to
do so.

--
Sybrand Bakker
Senior Oracle DBA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-08-2008, 12:35 PM
Fuzzy
 
Posts: n/a
Default Re: Why Oracle don't have AUTO_INCREMENT as in MySQL

On Apr 15, 2:12 am, "howa" <howac...@gmail.com> wrote:
> On 415, 銝1204, "Fuzzy" <fuzzy.greybe...@gmail.com> wrote:
>
> > On Apr 14, 7:27 am, "howa" <howac...@gmail.com> wrote:

>
> > > Seems AUTO_INCREMENT is very handy and natural, anyone agree?

>
> > Seems SEQUENCE is very handy and natural. Why don't others implement
> > SEQUENCE?

>
> > /Hans

>
> I can't agree SEQUENCE is more handy than AUTO_INCREMENT as you need
> to do the same thing by two statements.


Your opinion. Can't disagree with opinion. Leads to troll-talk.

>
> Also, in real world, use of AUTO_INCREMENT as primary key (e.g. id) is
> in fact, quite intuitive.


Actually, quite counter-intuitive. Your assumption is that there must
be an increment. Primary key is NOT incremental, just unique.
Increment is a specific busy-ness rule that may have nada to do with
primary key.

Putting too much into the definition can make thing go stoopid.

/Hans

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:05 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com