Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For confidential or other support please email.
The time now is Tue Feb 09, 2010 2:20 pm
 <b>Register</b> (required to post and download)Register (required to post and download)
 Username:    Password:   Remember login       
 FAQFAQ   SearchSearch   DigestsDigests 
Derby vs. HSQL/HXSQL (in-memory use)
To watch this topic for replies  Register (enables digests) or give email address:
Reply to topic    Home -> Forums -> Support -> Storage & search: JChem Base /Cartridge -> Derby vs. HSQL/HXSQL (in-memory use)

Display posts from previous:        View previous topic :: View next topic    
Author Message
olefevre
Joined: 15 Oct 2004
Posts: 83


View user's profile

Visit poster's website

Back to top
Post subject: Derby vs. HSQL/HXSQL (in-memory use)
Link to postPosted: Thu Mar 13, 2008 6:50 pm  Reply with quote

Szilard just reminded me that JChem now supports Derby as well. Any reason to go with it rather HSQLDB for in-process use? I tried it a couple of years ago, when it was still the IBM Cloudscape product and gave up: I dimly remember a 10-page installation booklet and being unable to get going in a reasonable amount of time (i.e., a couple hours). I also know that it is now included in the Sun JDK 1.6 under the JavaDB name but I don't see how that makes a difference to me.

Thanks in advance.
tdudgeon
Joined: 05 Oct 2004
Posts: 917
IJC personnel

View user's profile

Visit poster's website

Back to top
Post subject:
Link to postPosted: Mon Mar 17, 2008 10:47 am  Reply with quote

We use Derby for the local database in Instant JChem. Originally we used HSQL, but found some limitations that were solved by Derby. I think both are great databases, and which you choose depends on your exact needs.

Derby aims to be a fully functional relational database, and as such could be considered as an alternative to "grown up" databases like Oracle and MySQL in some cases. HSQL is more like a "toy database", providing a subset of the features of a fully functional databases. But that subset of functionality may be all you need.

Benefits of HSQL over Derby.
- light weight (smaller libraries, less complex)
- supports in memory databases

Benefits of Derby over HSQL
- much larger development community
- secured future (is part of JDK, is sponsored by IBM and Sun)
- More complete feature set (e.g. proper handling of transactions, encryption...)


In addition, when using HSQL we came across a number of big performance bottlenecks. These were the prime reasons why we switched to Derby:
1. adding a column was v. slow for big tables (could take a minute!)
2. select count(*) from aTable was very slow for large tables (did a full table scan to count the rows!)
3. SELECT DISTINCT ... did a full table scan, even though the column was indexed, making it a very slow operation on large tables
4. shutdown was slow causing big delays when you quit the application.
5. startup was slow if DB was not shutdown correctly.

The commercial version, HXSQL, addresses some of these problems, but is not free, and the files are not compatible with HSQLDB.


Tim
olefevre
Joined: 15 Oct 2004
Posts: 83


View user's profile

Visit poster's website

Back to top
Post subject:
Link to postPosted: Wed Mar 19, 2008 2:01 pm  Reply with quote

We use HXSQL and the data set is rather small; so far performance has not been an issue. My main concern is whether the db can be packaged within the application so as to require zero configuration on-site. It is also a bonus if it can be used as all-in-memory db, although not necessarily in-process (i.e., as long as using it in client-server mode does not create configuration hassles). Would Derby meet these requirements?
tdudgeon
Joined: 05 Oct 2004
Posts: 917
IJC personnel

View user's profile

Visit poster's website

Back to top
Post subject:
Link to postPosted: Wed Mar 19, 2008 2:24 pm  Reply with quote

Yes, Derby can meet all of those needs, except for a totally in-memory database.

Tim
Display posts from previous:   
Reply to topic    Home -> Forums -> Storage & search: JChem Base /Cartridge -> Derby vs. HSQL/HXSQL (in-memory use) All times are GMT + 1 Hour
Page 1 of 1
To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum