Compare with

Comparison of Hibernate with Derby server vs DataNucleus with DB4O embedded

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
 Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Basic Person Test3.80.0593.01.33.40.69
Element Collection Test2.00.0451.31.01.70.52
Inheritance Test3.40.0513.00.853.20.45
Indexing Test4.80.0804.12.34.41.2
Graph (Binary Tree) Test1.8failed1.6failed1.7failed
Multithreading Test6.9failed3.9failed5.4failed
All Tests3.80.0592.81.43.30.71

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
 Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Basic Person Test3.80.00478.41.86.10.90
Element Collection Test1.00.00381.01.51.00.77
Inheritance Test3.50.00359.72.26.61.1
Indexing Test3.20.00439.51.86.40.89
Graph (Binary Tree) Test0.91failed1.2failed1.1failed
Multithreading Test7.8failed13.4failed10.6failed
All Tests3.40.00417.21.85.30.91

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
 Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Basic Person Test34.0failed4.1failed19.1failed
Element Collection Test33.8failed0.64failed17.2failed
Inheritance Test20.5failed5.0failed12.8failed
Indexing Test2.0failed9.2failed5.6failed
Multithreading Test36.2failed5.1failed20.6failed
All Tests25.3failed4.8failed15.1failed

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
 Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Basic Person Test2.90.0122.50.762.70.39
Element Collection Test2.30.0121.51.11.90.53
Inheritance Test2.90.0113.50.813.20.41
Indexing Test3.00.0114.21.33.60.64
Graph (Binary Tree) Test1.2failed0.58failed0.91failed
Multithreading Test6.8failed2.5failed4.6failed
All Tests3.20.0122.50.972.80.49

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
 Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Basic Person Test2.90.0113.51.53.20.74
Element Collection Test1.70.0100.871.61.30.80
Inheritance Test2.90.00933.61.13.20.57
Indexing Test3.70.0173.62.13.71.1
Graph (Binary Tree) Test0.69failed0.70failed0.70failed
Multithreading Test6.2failed5.1failed5.6failed
All Tests3.00.0122.91.63.00.79

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
 Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Hibernate
Derby server
DataNucleus
DB4O embedded
Basic Person Test9.50.0224.31.36.90.68
Element Collection Test8.20.0181.11.34.60.66
Inheritance Test6.60.0195.01.25.80.63
Indexing Test3.30.0286.11.94.70.94
Graph (Binary Tree) Test1.2failed1.0failed1.1failed
Multithreading Test12.8failed6.0failed9.4failed
All Tests7.10.0224.01.45.60.73

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