Compare with

Comparison of DataNucleus with DB4O embedded vs Hibernate with Derby server

Each of the following tables focuses on a specific database operation, where the last table presents average results comparison.

Speed comparison of JPA database persistence operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
Basic Person Test0.0593.81.33.00.693.4
Element Collection Test0.0452.01.01.30.521.7
Inheritance Test0.0513.40.853.00.453.2
Indexing Test0.0804.82.34.11.24.4
Graph (Binary Tree) Testfailed1.8failed1.6failed1.7
Multithreading Testfailed6.9failed3.9failed5.4
All Tests0.0593.81.42.80.713.3

DataNucleus with DB4O embedded has failed in 4 tests (see exceptions).

The results above show that in general Hibernate with Derby server is much more efficient than DataNucleus with DB4O embedded in persisting JPA entity objects to the database. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.71) to the normalized speed of Hibernate with Derby database server (3.3) reveals that in these tests, Hibernate with Derby server is 4.6 times faster than DataNucleus with DB4O embedded.

A huge performance gap has been detected when using class inheritance in the object model with small transaction size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.051) to the normalized speed of Hibernate with Derby database server (3.4) reveals that in that case, Hibernate with Derby server is 66.7 times faster than DataNucleus with DB4O embedded.

Speed comparison of JPA database retrieval operations (normalized score, higher is better)

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
Basic Person Test0.00473.81.88.40.906.1
Element Collection Test0.00381.01.51.00.771.0
Inheritance Test0.00353.52.29.71.16.6
Indexing Test0.00433.21.89.50.896.4
Graph (Binary Tree) Testfailed0.91failed1.2failed1.1
Multithreading Testfailed7.8failed13.4failed10.6
All Tests0.00413.41.87.20.915.3

DataNucleus with DB4O embedded has failed in 4 tests (see exceptions).

The results above show that in general Hibernate with Derby server is much more efficient than DataNucleus with DB4O embedded in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.91) to the normalized speed of Hibernate with Derby database server (5.3) reveals that in these tests, Hibernate with Derby server is 5.8 times faster than DataNucleus with DB4O embedded.

A huge performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.0035) to the normalized speed of Hibernate with Derby database server (3.5) reveals that in that case, Hibernate with Derby server is 1,000 times faster than DataNucleus with DB4O embedded.

Speed comparison of JPA database query operations (normalized score, higher is better)

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
Basic Person Testfailed34.0failed4.1failed19.1
Element Collection Testfailed33.8failed0.64failed17.2
Inheritance Testfailed20.5failed5.0failed12.8
Indexing Testfailed2.0failed9.2failed5.6
Multithreading Testfailed36.2failed5.1failed20.6
All Testsfailed25.3failed4.8failed15.1

DataNucleus with DB4O embedded has failed in 10 tests (see exceptions).

Speed comparison of JPA database update operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
Basic Person Test0.0122.90.762.50.392.7
Element Collection Test0.0122.31.11.50.531.9
Inheritance Test0.0112.90.813.50.413.2
Indexing Test0.0113.01.34.20.643.6
Graph (Binary Tree) Testfailed1.2failed0.58failed0.91
Multithreading Testfailed6.8failed2.5failed4.6
All Tests0.0123.20.972.50.492.8

DataNucleus with DB4O embedded has failed in 4 tests (see exceptions).

The results above show that in general Hibernate with Derby server is much more efficient than DataNucleus with DB4O embedded in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.49) to the normalized speed of Hibernate with Derby database server (2.8) reveals that in these tests, Hibernate with Derby server is 5.7 times faster than DataNucleus with DB4O embedded.

A huge performance gap has been detected when using database indexes with small transaction size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.011) to the normalized speed of Hibernate with Derby database server (3.0) reveals that in that case, Hibernate with Derby server is 273 times faster than DataNucleus with DB4O embedded.

Speed comparison of JPA database removal operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
Basic Person Test0.0112.91.53.50.743.2
Element Collection Test0.0101.71.60.870.801.3
Inheritance Test0.00932.91.13.60.573.2
Indexing Test0.0173.72.13.61.13.7
Graph (Binary Tree) Testfailed0.69failed0.70failed0.70
Multithreading Testfailed6.2failed5.1failed5.6
All Tests0.0123.01.62.90.793.0

DataNucleus with DB4O embedded has failed in 4 tests (see exceptions).

The results above show that in general Hibernate with Derby server is much more efficient than DataNucleus with DB4O embedded in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.79) to the normalized speed of Hibernate with Derby database server (3.0) reveals that in these tests, Hibernate with Derby server is 3.8 times faster than DataNucleus with DB4O embedded.

A huge performance gap has been detected when using class inheritance in the object model with small transaction size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.0093) to the normalized speed of Hibernate with Derby database server (2.9) reveals that in that case, Hibernate with Derby server is 312 times faster than DataNucleus with DB4O embedded.

Comparison of JPA/Database speed - the averages (normalized score, higher is better)

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
Basic Person Test0.0229.51.34.30.686.9
Element Collection Test0.0188.21.31.10.664.6
Inheritance Test0.0196.61.25.00.635.8
Indexing Test0.0283.31.96.10.944.7
Graph (Binary Tree) Testfailed1.2failed1.0failed1.1
Multithreading Testfailed12.8failed6.0failed9.4
All Tests0.0227.11.44.00.735.6

The results above show that in general Hibernate with Derby server is much more efficient than DataNucleus with DB4O embedded in performing JPA database operations. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.73) to the normalized speed of Hibernate with Derby database server (5.6) reveals that in these tests, Hibernate with Derby server is 7.7 times faster than DataNucleus with DB4O embedded.

A huge performance gap has been detected when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.018) to the normalized speed of Hibernate with Derby database server (8.2) reveals that in that case, Hibernate with Derby server is 456 times faster than DataNucleus with DB4O embedded.

Other Head to Head DBMS/JPA Comparisons