Compare with

Comparison of Hibernate with Derby embedded vs DataNucleus with Derby 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 embedded
DataNucleus
Derby embedded
Hibernate
Derby embedded
DataNucleus
Derby embedded
Hibernate
Derby embedded
DataNucleus
Derby embedded
Basic Person Test5.94.63.82.84.93.7
Element Collection Test2.92.41.81.62.32.0
Inheritance Test5.34.63.72.74.53.7
Indexing Test7.07.64.84.85.96.2
Graph (Binary Tree) Test1.91.61.71.41.81.5
Multithreading Test10.58.63.73.37.15.9
All Tests5.64.93.32.84.43.8

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby embedded
DataNucleus
Derby embedded
Hibernate
Derby embedded
DataNucleus
Derby embedded
Hibernate
Derby embedded
DataNucleus
Derby embedded
Basic Person Test14.26.816.414.915.310.9
Element Collection Test4.45.44.97.64.66.5
Inheritance Test10.38.818.614.814.411.8
Indexing Test10.09.216.414.113.211.6
Graph (Binary Tree) Test2.69.93.015.82.812.9
Multithreading Test19.311.919.311.519.311.7
All Tests10.18.713.113.111.610.9

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

A large performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of DataNucleus with Derby embedded database (6.8) to the normalized speed of Hibernate with Derby embedded database (14.2) reveals that in that case, Hibernate with Derby embedded is 2.1 times faster than DataNucleus with Derby embedded.

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby embedded
DataNucleus
Derby embedded
Hibernate
Derby embedded
DataNucleus
Derby embedded
Hibernate
Derby embedded
DataNucleus
Derby embedded
Basic Person Test49.339.16.87.528.123.3
Element Collection Test37.646.02.76.720.126.3
Inheritance Test24.17.77.63.815.95.7
Indexing Test5.30.05314.88.010.14.0
Multithreading Test39.7failed6.1failed22.9failed
All Tests31.223.27.66.519.414.8

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

The results above show that in general Hibernate with Derby embedded is more efficient than DataNucleus with Derby embedded 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 embedded database (0.053) to the normalized speed of Hibernate with Derby embedded database (5.3) reveals that in that case, Hibernate with Derby embedded is 100 times faster than DataNucleus with Derby embedded.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby embedded
DataNucleus
Derby embedded
Hibernate
Derby embedded
DataNucleus
Derby embedded
Hibernate
Derby embedded
DataNucleus
Derby embedded
Basic Person Test4.54.03.23.83.83.9
Element Collection Test3.93.73.14.53.54.1
Inheritance Test4.64.44.54.84.54.6
Indexing Test4.65.25.54.25.14.7
Graph (Binary Tree) Test2.72.71.21.52.02.1
Multithreading Test11.6failed2.6failed7.1failed
All Tests5.34.03.33.74.33.9

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

The results above show that in general Hibernate with Derby embedded is slightly more efficient than DataNucleus with Derby embedded in updating JPA entity objects in the database.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby embedded
DataNucleus
Derby embedded
Hibernate
Derby embedded
DataNucleus
Derby embedded
Hibernate
Derby embedded
DataNucleus
Derby embedded
Basic Person Test3.83.54.21.34.02.4
Element Collection Test2.31.91.51.61.91.7
Inheritance Test4.02.44.31.34.21.9
Indexing Test5.56.63.61.94.64.3
Graph (Binary Tree) Test0.740.810.960.930.850.87
Multithreading Test5.6failed4.9failed5.3failed
All Tests3.73.03.31.43.52.2

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

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

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

Comparison of database storage efficiency (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby embedded
DataNucleus
Derby embedded
Hibernate
Derby embedded
DataNucleus
Derby embedded
Hibernate
Derby embedded
DataNucleus
Derby embedded
Basic Person Test52.753.352.753.352.753.3
Element Collection Test42.342.642.342.642.342.6
Inheritance Test49.248.149.248.149.248.1
Indexing Test53.062.353.963.353.462.8
Graph (Binary Tree) Test13.113.69.810.211.511.9
Multithreading Test49.352.08.88.029.030.0
All Tests43.345.336.137.639.741.5

The results above show that in general DataNucleus with Derby embedded is slightly more efficient than Hibernate with Derby embedded in using disk space.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
Derby embedded
DataNucleus
Derby embedded
Hibernate
Derby embedded
DataNucleus
Derby embedded
Hibernate
Derby embedded
DataNucleus
Derby embedded
Basic Person Test15.511.66.96.111.28.8
Element Collection Test10.211.92.84.46.58.1
Inheritance Test9.75.67.75.58.75.5
Indexing Test6.55.79.06.67.86.2
Graph (Binary Tree) Test2.03.71.74.91.84.3
Multithreading Test17.310.37.37.412.38.8
All Tests10.58.06.15.78.36.9

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

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

Other Head to Head DBMS/JPA Comparisons