Compare with

Comparison of DataNucleus with Derby server 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
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
Basic Person Test2.83.82.33.02.63.4
Element Collection Test0.712.00.351.30.531.7
Inheritance Test2.73.42.03.02.33.2
Indexing Test4.54.84.04.14.34.4
Graph (Binary Tree) Test0.621.80.531.60.571.7
Multithreading Test4.96.93.43.94.15.4
All Tests2.73.82.12.82.43.3

The results above show that in general Hibernate with Derby server is more efficient than DataNucleus with Derby server in persisting JPA entity objects to the database.

A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.35) to the normalized speed of Hibernate with Derby database server (1.3) reveals that in that case, Hibernate with Derby server is 3.7 times faster than DataNucleus with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
Basic Person Test0.563.86.38.43.46.1
Element Collection Test0.361.00.931.00.641.0
Inheritance Test0.453.56.89.73.66.6
Indexing Test0.503.27.19.53.86.4
Graph (Binary Tree) Test0.220.916.61.23.41.1
Multithreading Test1.27.810.013.45.610.6
All Tests0.553.46.37.23.45.3

The results above show that in general Hibernate with Derby server is more efficient than DataNucleus with Derby server in retrieving JPA entity objects from the database.

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

On the other hand, Hibernate with Derby server is slower, for instance, when using graphs of objects with large retrieval size. Comparing the normalized speed of Hibernate with Derby database server (1.2) to the normalized speed of DataNucleus with Derby database server (6.6) reveals that in that case, Hibernate with Derby server is 5.5 times slower than DataNucleus with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
Basic Person Test37.734.03.64.120.719.1
Element Collection Test25.933.81.40.6413.617.2
Inheritance Test6.520.51.85.04.212.8
Indexing Test0.0302.04.99.22.55.6
Multithreading Testfailed36.2failed5.1failed20.6
All Tests17.525.32.94.810.215.1

DataNucleus with Derby server has failed in 2 tests (see exceptions).

The results above show that in general Hibernate with Derby server is more efficient than DataNucleus with Derby server in executing the tested JPA queries.

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.030) to the normalized speed of Hibernate with Derby database server (2.0) reveals that in that case, Hibernate with Derby server is 66.7 times faster than DataNucleus with Derby server.

On the other hand, Hibernate with Derby server is slower, for instance, when using JPA element collections with large retrieval size. Comparing the normalized speed of Hibernate with Derby database server (0.64) to the normalized speed of DataNucleus with Derby database server (1.4) reveals that in that case, Hibernate with Derby server is 2.2 times slower than DataNucleus with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
Basic Person Test1.12.90.852.50.992.7
Element Collection Test0.812.30.621.50.711.9
Inheritance Test1.22.91.33.51.23.2
Indexing Test1.23.01.54.21.33.6
Graph (Binary Tree) Test0.291.20.410.580.350.91
Multithreading Testfailed6.8failed2.5failed4.6
All Tests0.933.20.922.50.922.8

DataNucleus with Derby server has failed in 2 tests (see exceptions).

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

A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.29) to the normalized speed of Hibernate with Derby database server (1.2) reveals that in that case, Hibernate with Derby server is 4.1 times faster than DataNucleus with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
Basic Person Test1.32.91.33.51.33.2
Element Collection Test0.611.70.330.870.471.3
Inheritance Test1.02.91.33.61.23.2
Indexing Test2.33.71.93.62.13.7
Graph (Binary Tree) Test0.260.690.460.700.360.70
Multithreading Testfailed6.2failed5.1failed5.6
All Tests1.13.01.12.91.13.0

DataNucleus with Derby server has failed in 2 tests (see exceptions).

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

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
Basic Person Test8.79.52.94.35.86.9
Element Collection Test5.78.20.721.13.24.6
Inheritance Test2.46.62.65.02.55.8
Indexing Test1.73.33.96.12.84.7
Graph (Binary Tree) Test0.351.22.01.01.21.1
Multithreading Test3.012.86.76.04.99.4
All Tests3.87.12.84.03.35.6

The results above show that in general Hibernate with Derby server is more efficient than DataNucleus with Derby server in performing JPA database operations.

A large performance gap has been detected when using multithreading with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (3.0) to the normalized speed of Hibernate with Derby database server (12.8) reveals that in that case, Hibernate with Derby server is 4.3 times faster than DataNucleus with Derby server.

On the other hand, Hibernate with Derby server is slower, for instance, when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of Hibernate with Derby database server (1.0) to the normalized speed of DataNucleus with Derby database server (2.0) reveals that in that case, Hibernate with Derby server is 2.0 times slower than DataNucleus with Derby server.

Other Head to Head DBMS/JPA Comparisons