Compare with

Comparison of OpenJPA with H2 embedded 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
 OpenJPA
H2 embedded
DataNucleus
DB4O embedded
OpenJPA
H2 embedded
DataNucleus
DB4O embedded
OpenJPA
H2 embedded
DataNucleus
DB4O embedded
Basic Person Test17.10.0595.81.311.50.69
Element Collection Test10.90.0454.91.07.90.52
Inheritance Test14.30.0515.90.8510.10.45
Indexing Test24.40.08013.72.319.11.2
Graph (Binary Tree) Test6.8failed6.7failed6.7failed
Multithreading Test34.2failed10.2failed22.2failed
All Tests17.90.0597.91.412.90.71

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

The results above show that in general OpenJPA with H2 embedded 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 OpenJPA with H2 embedded database (12.9) reveals that in these tests, OpenJPA with H2 embedded is 18.2 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.080) to the normalized speed of OpenJPA with H2 embedded database (24.4) reveals that in that case, OpenJPA with H2 embedded is 305 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
 OpenJPA
H2 embedded
DataNucleus
DB4O embedded
OpenJPA
H2 embedded
DataNucleus
DB4O embedded
OpenJPA
H2 embedded
DataNucleus
DB4O embedded
Basic Person Test14.60.004727.21.820.90.90
Element Collection Test0.00460.00384.31.52.10.77
Inheritance Test0.0110.00357.42.23.71.1
Indexing Test17.00.004335.01.826.00.89
Graph (Binary Tree) Test1.0failed1.4failed1.2failed
Multithreading Test18.7failed27.6failed23.1failed
All Tests8.60.004117.11.812.80.91

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

The results above show that in general OpenJPA with H2 embedded 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 OpenJPA with H2 embedded database (12.8) reveals that in these tests, OpenJPA with H2 embedded is 14.1 times faster than DataNucleus with DB4O embedded.

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.0043) to the normalized speed of OpenJPA with H2 embedded database (17.0) reveals that in that case, OpenJPA with H2 embedded is 3,953 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
 OpenJPA
H2 embedded
DataNucleus
DB4O embedded
OpenJPA
H2 embedded
DataNucleus
DB4O embedded
OpenJPA
H2 embedded
DataNucleus
DB4O embedded
Basic Person Test5.0failed1.1failed3.1failed
Element Collection Test1.7failed1.3failed1.5failed
Inheritance Test2.2failed1.2failed1.7failed
Indexing Test13.8failed23.2failed18.5failed
Multithreading Test1.4failed0.60failed0.99failed
All Tests4.8failed5.5failed5.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
 OpenJPA
H2 embedded
DataNucleus
DB4O embedded
OpenJPA
H2 embedded
DataNucleus
DB4O embedded
OpenJPA
H2 embedded
DataNucleus
DB4O embedded
Basic Person Test10.00.0126.00.768.00.39
Element Collection Test0.0110.0123.81.11.90.53
Inheritance Test0.0460.0115.00.812.50.41
Indexing Test8.90.0117.01.38.00.64
Graph (Binary Tree) Test2.4failed1.3failed1.9failed
Multithreading Test16.6failed4.3failed10.4failed
All Tests6.30.0124.60.975.40.49

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

The results above show that in general OpenJPA with H2 embedded 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 OpenJPA with H2 embedded database (5.4) reveals that in these tests, OpenJPA with H2 embedded is 11.0 times faster than DataNucleus with DB4O embedded.

A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.012) to the normalized speed of OpenJPA with H2 embedded database (10.0) reveals that in that case, OpenJPA with H2 embedded is 833 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
 OpenJPA
H2 embedded
DataNucleus
DB4O embedded
OpenJPA
H2 embedded
DataNucleus
DB4O embedded
OpenJPA
H2 embedded
DataNucleus
DB4O embedded
Basic Person Test18.30.01111.11.514.70.74
Element Collection Test0.0120.0102.91.61.40.80
Inheritance Test0.0300.00936.61.13.30.57
Indexing Test23.20.0179.72.116.41.1
Graph (Binary Tree) Test1.8failed2.4failed2.1failed
Multithreading Test31.2failed17.3failed24.2failed
All Tests12.40.0128.31.610.40.79

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

The results above show that in general OpenJPA with H2 embedded 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 OpenJPA with H2 embedded database (10.4) reveals that in these tests, OpenJPA with H2 embedded is 13.2 times faster than DataNucleus with DB4O embedded.

A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.011) to the normalized speed of OpenJPA with H2 embedded database (18.3) reveals that in that case, OpenJPA with H2 embedded is 1,664 times faster than DataNucleus with DB4O embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
H2 embedded
DataNucleus
DB4O embedded
OpenJPA
H2 embedded
DataNucleus
DB4O embedded
OpenJPA
H2 embedded
DataNucleus
DB4O embedded
Basic Person Test27.035.127.035.427.035.2
Element Collection Test30.629.530.629.930.629.7
Inheritance Test27.033.427.033.527.033.4
Indexing Test31.641.032.141.931.941.5
Graph (Binary Tree) Test28.5failed21.4failed24.9failed
Multithreading Test33.9failed9.2failed21.5failed
All Tests29.834.824.535.227.235.0

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

The results above show that in general DataNucleus with DB4O embedded is slightly more efficient than OpenJPA with H2 embedded in using disk space.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
H2 embedded
DataNucleus
DB4O embedded
OpenJPA
H2 embedded
DataNucleus
DB4O embedded
OpenJPA
H2 embedded
DataNucleus
DB4O embedded
Basic Person Test13.00.02210.21.311.60.68
Element Collection Test2.50.0183.41.33.00.66
Inheritance Test3.30.0195.21.24.30.63
Indexing Test17.50.02817.71.917.60.94
Graph (Binary Tree) Test3.0failed3.0failed3.0failed
Multithreading Test20.4failed12.0failed16.2failed
All Tests10.20.0228.81.49.50.73

The results above show that in general OpenJPA with H2 embedded 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 OpenJPA with H2 embedded database (9.5) reveals that in these tests, OpenJPA with H2 embedded is 13.0 times faster than DataNucleus with DB4O embedded.

A huge performance gap has been detected when using database indexes with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.028) to the normalized speed of OpenJPA with H2 embedded database (17.5) reveals that in that case, OpenJPA with H2 embedded is 625 times faster than DataNucleus with DB4O embedded.

Other Head to Head DBMS/JPA Comparisons