[Open-bio-l] Re: [Bioperl-l] biosql primary key generation

Chris Mungall cjm@fruitfly.org
Sun, 11 Aug 2002 09:23:05 -0700 (PDT)


have a look at the postgres version of the db - there is a script that
takes every mysql autoincrement and turns it into a sequence, and also
adds the corresponding CREATE SEQUENCE statement. if you look at the
bioperl-db code there is a switch up in the BaseAdapter that does the
Right Thing depending on whichever dbms is being used

On Sun, 11 Aug 2002, Hilmar Lapp wrote:

> I do have triggers in Oracle on primary key fields, that's not the
> problem. The problem is controlling the primary key value from the
> /application/ (or library for that matter) such that you can return
> it to the caller who requested the insert.
>
> 	-hilmar
>
> On Saturday, August 10, 2002, at 09:42  PM, Todd Richmond wrote:
>
> > On 8/10/02 10:23 PM, "Hilmar Lapp" <hlapp@gnf.org> wrote:
> >
> >> The problem with the topic is that the MySQL idiosyncratic way of
> >> generating PKs behind the scenes via AUTO_INCREMENT fields is
> >> completely incompatible with any other reasonable RDBMS, including
> >> Postgres and Oracle.
> >
> > Is the problem that Oracle and Postgres don't have AUTO_INCREMENT
> > or that
> > MySQL doesn't support sequences? Because you can duplicate
> > AUTO_INCREMENT in
> > Oracle using a sequence and an insert trigger, so that it's no
> > different
> > than MySQL.
> >
> > Tpdd
> >
> > --
> > Todd Richmond, PhD
> > http://cellwall.stanford.edu/todd
> > email: todd@verdant.stanford.edu
> >
> >
> >
> --
> -------------------------------------------------------------
> Hilmar Lapp                            email: lapp at gnf.org
> GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
> -------------------------------------------------------------
>
> _______________________________________________
> Open-Bio-l mailing list
> Open-Bio-l@open-bio.org
> http://open-bio.org/mailman/listinfo/open-bio-l
>