Apache's Derby database has graduated from incubation to become a full project. According to some sources, Derby is going to be supplied by Sun with some of its Java products.
Derby is a version of IBM's Cloudscape database. IBM says that the difference between Derby and Cloudscape is purely based on support, according to "Why IBM is open sourcing Cloudscape as Derby."
-
Apache Derby graduates from incubator (15 messages)
- Posted by: Joseph Ottinger
- Posted on: August 07 2005 08:30 EDT
Threaded Messages (15)
- Performance? by Carl Rosenberger on August 07 2005 09:11 EDT
- Performance? by Joseph Ottinger on August 07 2005 10:13 EDT
-
Performance? by Rickard Oberg on August 07 2005 11:15 EDT
-
Performance? by Joseph Ottinger on August 07 2005 07:26 EDT
- Derby not so slow... by Patrice Drolet on August 08 2005 03:49 EDT
-
Performance? by Sunitha K on August 09 2005 01:09 EDT
-
Performance? by Jan Hansen on August 10 2005 08:15 EDT
- OODBMS? by Giorgio Clavelli on August 11 2005 05:23 EDT
- Lite DBs comparisson with Java by Daniel Oliva Bianco on March 16 2009 11:35 EDT
-
Performance? by Jan Hansen on August 10 2005 08:15 EDT
-
Performance? by Joseph Ottinger on August 07 2005 07:26 EDT
-
Performance? by Rickard Oberg on August 07 2005 11:15 EDT
- Performance? by Joseph Ottinger on August 07 2005 10:13 EDT
- Transaction isolation? by Mikael G ueck on August 07 2005 13:30 EDT
- Transaction isolation? by Nicolas B?lisle on August 08 2005 10:32 EDT
- Derby and Hibernate by Juergen Weber on August 08 2005 03:58 EDT
- Derby is not alone open source data base. by Nishant Saini on August 08 2005 10:39 EDT
- Derby is not alone open source data base. by PJ Murray on August 08 2005 10:52 EDT
- Derby and Hibernate by Calvin Smith on August 08 2005 12:19 EDT
- Derby is not alone open source data base. by Nishant Saini on August 08 2005 10:39 EDT
-
Performance?[ Go to top ]
- Posted by: Carl Rosenberger
- Posted on: August 07 2005 09:11 EDT
- in response to Joseph Ottinger
Apparently Derby does not seem to be the fastest database engine around:
http://polepos.sourceforge.net/results/html/bahrain_query_indexed_int.html -
Performance?[ Go to top ]
- Posted by: Joseph Ottinger
- Posted on: August 07 2005 10:13 EDT
- in response to Carl Rosenberger
Did they use the current version? Did they use embedded Derby, or networked derby? Some of the results make me question the validity of the test - or what it's testing.
Note that I'm not saying Derby is *fast* or not - that's not my role. Nor can I say offhand whether that test is right or not, but I can only say that they don't say enough about how they test in the test results for me to be able to say "wow" or not. -
Performance?[ Go to top ]
- Posted by: Rickard Oberg
- Posted on: August 07 2005 11:15 EDT
- in response to Joseph Ottinger
Did they use the current version? Did they use embedded Derby, or networked derby?
Well, the source *is* available, so it's not rocket science to find out. jdbc.properties currently says:
derby.driverclass=org.apache.derby.jdbc.EmbeddedDriver
derby.connecturl=jdbc:derby:data/derby/dbbench;create=true
which would imply that the embedded version is used. -
Performance?[ Go to top ]
- Posted by: Joseph Ottinger
- Posted on: August 07 2005 19:26 EDT
- in response to Rickard Oberg
Thank you, Rickard. That answers that - now Apache gets to figure out why Derby does so poorly, perhaps? -
Derby not so slow...[ Go to top ]
- Posted by: Patrice Drolet
- Posted on: August 08 2005 15:49 EDT
- in response to Joseph Ottinger
Hi,
When people compare apples with oranges...
I tried HDQLDB last year but got Out of memory error when the database had more than a few hundred thousand records. I tried all the possible configurations properties with no succes (I do not remember all I did, but I tried everything that the developers advised me to do); HSQLDB starts slowly and cannot handle big databases. I am not saying this is a bad database; this simply has a very different design and not suitable for big databases when memory is limited. I guess it handles everything in memory...
I have been working with derby for a few months and I am very happy with it. It does not take too much heap and is reasonably fast. I compared it to a postgres database 8.0.3 (feeling comparison only) and it seems similar. For embedded databaes, this a a real killer because very simple to integrate and has functions to backup and restore with or without rollover log. I am not worried at all when comes the time to roll out my application.
Patrice Drolet
President
Logiciels INFO-DATA inc. -
Performance?[ Go to top ]
- Posted by: Sunitha K
- Posted on: August 09 2005 13:09 EDT
- in response to Joseph Ottinger
I took a quick look at the benchmark at polepos, specially the bahrain test. The test uses Statements instead of PreparedStatement for the select queries. ( see BahrainJdbc.java where select queries are like "select * from bahrain where LicenseID=" + i )
One important performance tip is to use PreparedStatement with dynamic markers instead of Statements. This can show considerable improvements, I have seen 6 times improvements in some cases.
If you use Statement with literal values as in the case above, that will involve derby having to compile a query plan for each of the statements which affects performance. Using PreparedStatement with dynamic markers ('?') avoids unnecessary compilation cost , and thus faster.
So for example - if you are executing the query above(in 1st para) with different LicenseID values, using a Statement will involve compilation cost for each statement executed. But in case of PreparedStatement, the query would be ' select * from bahrain where LicenseID=?" and the statement is compiled only the first time or when the optimizer thinks the plan is stale.
Check out the tuning manual for more details :- http://db.apache.org/derby/docs/dev/tuning/ctunperf18705.html
http://db.apache.org/derby/docs/dev/tuning/ctundepth29804.html#ctundepth29804
---------
Also I think, sometimes default behaviors of databases are different and this can lead to different performance out of the box - some key factors such as the default isolation level, I/O syncs on a commit or not. While Derby forces a I/O sync call on a commit by default... but when I looked at the docs for HSQLDB and Pointbase last, I saw that by default they dont force a sync call to the disk on a commit.
It might be good to take note of these points when benchmarking to ensure that we are not comparing apples to oranges.
Sunitha. -
Performance?[ Go to top ]
- Posted by: Jan Hansen
- Posted on: August 10 2005 08:15 EDT
- in response to Sunitha K
How does Derby compare with other open source databases written in Java?
Now we just need an open source OODBMS written in Java or does such allready exist? -
OODBMS?[ Go to top ]
- Posted by: Giorgio Clavelli
- Posted on: August 11 2005 17:23 EDT
- in response to Jan Hansen
Have a look at Db4o. It seems a great product expecially for embedded use. -
Lite DBs comparisson with Java[ Go to top ]
- Posted by: Daniel Oliva Bianco
- Posted on: March 16 2009 11:35 EDT
- in response to Jan Hansen
I created a document that is a Java benchmark to compare "small" database engines http://sites.google.com/site/olivabianco/java-blog/comparisonbetweenderby-sqlite-hslqdb-h2databases Tell me what you think about it, and how could I improve it. Note: You can also check http://www.polepos.org/ to see a deeper DB comparisson -
Transaction isolation?[ Go to top ]
- Posted by: Mikael G ueck
- Posted on: August 07 2005 13:30 EDT
- in response to Joseph Ottinger
Could it be that there is a slight difference between how HSQLDB and Derby handle transation isolation?
"HSQLDB support only read uncommitted isolation level when queries are made from your Java program." in http://www.hsqldb.org/web/hsqlFAQ.html -
Transaction isolation?[ Go to top ]
- Posted by: Nicolas B?lisle
- Posted on: August 08 2005 10:32 EDT
- in response to Mikael G ueck
Derby is read COMMITED by default: "If a connection does not specify its isolation level, it inherits the default isolation level for the Derby system, The default value is CS. When set to CS, the connection inherits the TRANSACTION_READ_COMMITTED isolation level." in http://db.apache.org/derby/docs/devguide/cdevconcepts22300.html
Also, Derby supports all (four) isolation levels. From: http://db.apache.org/derby/docs/devguide/cdevconcepts15366.html
Regards,
Nicolas -
Derby and Hibernate[ Go to top ]
- Posted by: Juergen Weber
- Posted on: August 08 2005 03:58 EDT
- in response to Joseph Ottinger
Having a great open source database is great news for the Java community.
Now the task is to get Derby to run with Hibernate to have a great couple for ones database needs.
Unfortunately there is only a Derby dialect for Hibernate 3, for the lot of Hibernate 2 using systems out there is no support yet, is it? -
Derby is not alone open source data base.[ Go to top ]
- Posted by: Nishant Saini
- Posted on: August 08 2005 10:39 EDT
- in response to Juergen Weber
Having a great open source database is great news for the Java community.
Derby is not alone to be open source and there are greater data bases ......
Now the task is to get Derby to run with Hibernate to have a great couple for ones database needs.
Daffodil's one dollar DB, Mckoi DB etc. are also great java databases that run with hibernate as well as major JDO implementations. Have you seen any of them ? -
Derby is not alone open source data base.[ Go to top ]
- Posted by: PJ Murray
- Posted on: August 08 2005 10:52 EDT
- in response to Nishant Saini
Derby is not alone to be open source and there are greater data bases ......Daffodil's one dollar DB, Mckoi DB etc. are also great java databases that run with hibernate as well as major JDO implementations. Have you seen any of them ?
There's some important differences that make Derby special (originally developed by IBM, it's an Apache project, technical support from IBM as Cloudscape, etc).
Derby has a lot going for it - you can read more here:
http://www.codefutures.com/weblog/corporate/archives/2005/04/apache_derby_a.html
This was written on the (correct) assumption that Derby would graduate to a full project status.
PJ Murray
CodeFutures Software
Code Generation for Java Persistence -
Derby and Hibernate[ Go to top ]
- Posted by: Calvin Smith
- Posted on: August 08 2005 12:19 EDT
- in response to Juergen Weber
Unfortunately there is only a Derby dialect for Hibernate 3, for the lot of Hibernate 2 using systems out there is no support yet, is it?
See http://opensource.atlassian.com/projects/hibernate/browse/HB-1224 for the actual dialect class and a couple of other required classes. If you have those on your classpath, you can use the DerbyDialect. I use Hibernate3 now, but used this dialect fine with Hibernate2 for months.
hth...