[BioSQL-l] PostgreSQL schema support in BioSQL and bioperl-db

Richard Holland holland at ebi.ac.uk
Thu Jun 7 12:22:11 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When I said JDBC, what I really meant to say was Hibernate... Hibernate
controls the mapping between BioJava and BioSQL via a set of mapping
files and a connection parameters file (hibernate.cfg.xml), the latter
of which is what I was referring to.

Hibernate will use public if you don't specify a schema in the
connection parameters file. If you want to use something else, do this
in your connection parameters file:

   <property name="default_schema">biosql</property>

(changing biosql to whatever your schema happens to be).

cheers,
Richard

Hilmar Lapp wrote:
> I guess I'm behind the curve here a bit - schemas are optional in
> Postgres - if you say JDBC connection objects require a schema, does
> that mean it may also be null or empty?
> 
>     -hilmar
> 
> On Jun 7, 2007, at 3:33 AM, Richard Holland wrote:
> 
> Sounds great.
> 
> BioJava users shouldn't need to change anything to get this to work as
> PostgreSQL JDBC connection objects already require you to specify a
> schema.
> 
> cheers,
> Richard
> 
> 
> Hilmar Lapp wrote:
>>>> I have added support to BioSQL and bioperl-db for schemas in PostgreSQL.
>>>> A schema in PostgreSQL is more or less a namespace for database objects
>>>> (tables, indexes, views, etc) within a database.
>>>>
>>>> (A database in PostgreSQL is similar to the concept of a user in Oracle
>>>> or MySQL, and therefore for the latter two schemas are synonymous with a
>>>> user. [Not sure I'm still up-to-date on this for MySQL, but at least
>>>> that's what I recall.])
>>>>
>>>> When using the load_{seqdatabase,ontology,ncbi_taxonomy}.pl scripts, you
>>>> specify the schema in which BioSQL resides using the --schema option.
>>>>
>>>> If you are using bioperl-db as a library, the Bio::DB::BioDB->new() call
>>>> also accepts a -schema named parameter, and Bio::DB::DBContextI objects
>>>> have a $dbc->schema() property for getting/setting the schema,
>>>> Bio::DB::SimpleDBContext->new() accepts a -schema parameter, and you may
>>>> also add the property to the .bioperldb connection parameter file
>>>> (-schema => 'yourschemahere').
>>>>
>>>> Thanks for Brian Osborne for being the instigator (and tester, and for
>>>> adding the code to load_ncbi_taxonomy.pl - I came too late).
>>>>
>>>>     -hilmar
>>>> --===========================================================
>>>> : Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
>>>> ===========================================================
>>>>
>>>>
>>>>
>>>>
>>>>

> --===========================================================
> : Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
> ===========================================================





-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGZ/hz4C5LeMEKA/QRAhwRAKCX1kNyn0UdknpyRjQr82jYe4Z6bgCeKMGl
/94ZBeUaNd4t+T5B7333b/4=
=wQL0
-----END PGP SIGNATURE-----



More information about the BioSQL-l mailing list