I agree with Chris, a Hibernate-based solution would probably be the
best. I have never used MySQL "user defined functions" but I assume they
are similar to oracle's "stored procedures". In my opinion such a
solution has some disadvantages; they tend to be slow and also break the
DB-independence that Hibernate provides. What's the disadvantage of just
creating a CDK-DB module with an API for accessing hibernate-DAO's?

As I see it, the ideal approach would be if someone knowledgable of the
core CDK-classes added XDoclet tags so that hibernate mapping files and
DAO-objects could be generated with Ant/XDoclet. I know this is a big
undertaking (and far from trivial), but in my opinion it would be the
most versatile. Adding business-logic above this layer would then be
totally separated from the database access methods.

Another point:
Wouldn't a quick solution be to just store the entire molecule/reaction
etc as CML and duplicate all elements that you need indexed (like ID,
fingerprints, hashes, names etc.) as common data types in a regular RDB?
That (together with a custom annotation system) was the quick solution I
had in mind for a simple Bioclipse-database plugin based on Hibernate.
Very simple, and very easy/fast to implement. As long as you specify the
additional elements to be persisted, and write an API that takes care of
this, it would in my opinion scale quite well. Can anyone think of a
solution that would scale better and still keep all information in the
database?

Well, just my thoughts on the matter. I'm sure there are many comments
on this!

Cheers,

   .../Ola


On Thu, 2005-12-29 at 20:56, Christoph Steinbeck wrote:
> Egon Willighagen wrote:
> 
> > Java uses a general JDBC for interaction with database; it's the java 
> > version 
> > of the general ODBC architecture. Databases provide ODBC drivers, and users 
> > just know the JDBC/ODBC layer.
> > 
> > The DBReader/DBWriter use JDBC, and I assume NMRShiftDB does too.
> 
> Indirectly, yes.
> We use an object-relational mapper, like anyone else :-)
> Due to the "age" of NMRShiftDB, it's the Torque mapper from the apache 
> project. 
> I guess, nowadays one would use Hibernate.
> 
> The trick is not the OR-Mapping but the code to do the chemistry searches. 
> Substructure searching simply cannot be done efficiently based on SQL, so one 
> needs to do fingerprint-based prescreening.
> This again needed custom code, in MySQL called "user defined functions".
> 
> Cheers,
> 
> Chris



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to