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?...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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 |
| |||
| 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 -- |
| |||
| 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 |
| |||
| 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 |
| |||
| > 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... |
| |||
| 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 |
| |||
| 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. |
| |||
| 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 |
| ||||
| 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 |