[Biojava-l] BioSQL, Oracle, & isSPASupported?
Thomas Down
td2@sanger.ac.uk
Tue, 13 Aug 2002 12:56:39 +0100
On Mon, Aug 12, 2002 at 10:24:53AM -0700, Tim Burcham wrote:
> I am sure that I missed this somewhere in the archives, but...
> We are supporting an Oracle instance of BioSQL, and we keep running
> across this isSPASupported(), which seems to be some sort of BioSQL
> accelerator:
>
> PreparedStatement ps = conn.prepareStatement( "select
> biosql_accelerators_level()" );
>
> Are spaChecked & spaSupported ever true? In which case, against which
> DBMS?
Yes, it can be. Currently the only implementation is for
PostgreSQL. See:
http://www.biojava.org/download/biosql/biosql-accelerators-pg.sql
As you've probably guessed, the biosql_accelerators_level stored
procedure is just called as a check to see if the other stored
procedures are available (and that a matching version is in
use).
I'm hoping it should be reasonably easy to create a compatible
implementation of the accelerators in Oracle PL/SQL. However,
I've heard suggestions that the syntax I've been using for calling
stored procedures in PostgreSQL won't work with Oracle. I'd like
to find some way to handle this while minimizing the amount of
database-dependant code.
> We are moving a lot of functionality to a subclass of DBHelper to
> isolate BioSQLSequenceDB from the actual DBMS and SQL used. I would be
> curious how others are handing this for Oracle. It seems that the
> isSPASupported() method could also be isoloated this way, by just
> instantiating a different DBHelper. This would make the code much easier
> to read, and would not have the very similar duplication of code in
> BioSQLSequenceDB class.
Are you suggesting that isSPASupported() just return true or
false depending on which database is in use? I think we should
be cautious about this, since the SPA procedures are just an
extension, rather than a core part of BioSQL. The idea is that
end users can load the appropriate SPA implementation into the
database if they want it.
Does this make sense?
Thomas.