Compare with

Comparison of Hibernate with Derby server vs DataNucleus 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
 Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Basic Person Test3.82.83.02.33.42.6
Element Collection Test2.00.711.30.351.70.53
Inheritance Test3.42.73.02.03.22.3
Indexing Test4.84.54.14.04.44.3
Graph (Binary Tree) Test1.80.621.60.531.70.57
Multithreading Test6.94.93.93.45.44.1
All Tests3.82.72.82.13.32.4

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
 Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Basic Person Test3.80.568.46.36.13.4
Element Collection Test1.00.361.00.931.00.64
Inheritance Test3.50.459.76.86.63.6
Indexing Test3.20.509.57.16.43.8
Graph (Binary Tree) Test0.910.221.26.61.13.4
Multithreading Test7.81.213.410.010.65.6
All Tests3.40.557.26.35.33.4

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
 Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Basic Person Test34.037.74.13.619.120.7
Element Collection Test33.825.90.641.417.213.6
Inheritance Test20.56.55.01.812.84.2
Indexing Test2.00.0309.24.95.62.5
Multithreading Test36.2failed5.1failed20.6failed
All Tests25.317.54.82.915.110.2

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
 Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Basic Person Test2.91.12.50.852.70.99
Element Collection Test2.30.811.50.621.90.71
Inheritance Test2.91.23.51.33.21.2
Indexing Test3.01.24.21.53.61.3
Graph (Binary Tree) Test1.20.290.580.410.910.35
Multithreading Test6.8failed2.5failed4.6failed
All Tests3.20.932.50.922.80.92

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
 Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Basic Person Test2.91.33.51.33.21.3
Element Collection Test1.70.610.870.331.30.47
Inheritance Test2.91.03.61.33.21.2
Indexing Test3.72.33.61.93.72.1
Graph (Binary Tree) Test0.690.260.700.460.700.36
Multithreading Test6.2failed5.1failed5.6failed
All Tests3.01.12.91.13.01.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 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
 Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Hibernate
Derby server
DataNucleus
Derby server
Basic Person Test9.58.74.32.96.95.8
Element Collection Test8.25.71.10.724.63.2
Inheritance Test6.62.45.02.65.82.5
Indexing Test3.31.76.13.94.72.8
Graph (Binary Tree) Test1.20.351.02.01.11.2
Multithreading Test12.83.06.06.79.44.9
All Tests7.13.84.02.85.63.3

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