Compare with

Comparison of DataNucleus with DB4O embedded vs Hibernate with H2 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
 DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
Basic Person Test0.05918.11.39.00.6913.5
Element Collection Test0.04513.01.06.80.529.9
Inheritance Test0.05121.00.859.40.4515.2
Indexing Test0.08029.92.318.41.224.1
Graph (Binary Tree) Testfailed17.2failed20.1failed18.7
Multithreading Testfailed36.9failed11.5failed24.2
All Tests0.05922.61.412.50.7117.6

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

The results above show that in general Hibernate 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 Hibernate with H2 embedded database (17.6) reveals that in these tests, Hibernate with H2 embedded is 24.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.051) to the normalized speed of Hibernate with H2 embedded database (21.0) reveals that in that case, Hibernate with H2 embedded is 412 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
 DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
Basic Person Test0.004716.61.813.30.9015.0
Element Collection Test0.00384.31.54.00.774.1
Inheritance Test0.003510.42.217.51.113.9
Indexing Test0.004310.81.815.20.8913.0
Graph (Binary Tree) Testfailed2.5failed4.0failed3.3
Multithreading Testfailed16.2failed15.7failed15.9
All Tests0.004110.11.811.60.9110.9

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

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

A huge performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.0047) to the normalized speed of Hibernate with H2 embedded database (16.6) reveals that in that case, Hibernate with H2 embedded is 3,532 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
 DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
Basic Person Testfailed4.5failed1.2failed2.8
Element Collection Testfailed4.4failed1.4failed2.9
Inheritance Testfailed3.1failed1.5failed2.3
Indexing Testfailed6.6failed10.5failed8.6
Multithreading Testfailed1.2failed0.59failed0.89
All Testsfailed4.0failed3.0failed3.5

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
 DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
Basic Person Test0.01212.10.766.50.399.3
Element Collection Test0.0127.41.15.30.536.3
Inheritance Test0.01110.80.818.50.419.6
Indexing Test0.01110.01.37.50.648.8
Graph (Binary Tree) Testfailed4.4failed2.3failed3.4
Multithreading Testfailed16.2failed4.0failed10.1
All Tests0.01210.10.975.70.497.9

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

The results above show that in general Hibernate 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 Hibernate with H2 embedded database (7.9) reveals that in these tests, Hibernate with H2 embedded is 16.1 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 Hibernate with H2 embedded database (12.1) reveals that in that case, Hibernate with H2 embedded is 1,008 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
 DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
Basic Person Test0.01119.71.511.40.7415.5
Element Collection Test0.0106.91.64.50.805.7
Inheritance Test0.009315.61.112.90.5714.2
Indexing Test0.01723.22.112.41.117.8
Graph (Binary Tree) Testfailed4.0failed4.2failed4.1
Multithreading Testfailed27.4failed22.7failed25.0
All Tests0.01216.11.611.40.7913.7

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

The results above show that in general Hibernate 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 Hibernate with H2 embedded database (13.7) reveals that in these tests, Hibernate with H2 embedded is 17.3 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 Hibernate with H2 embedded database (19.7) reveals that in that case, Hibernate with H2 embedded is 1,791 times faster than DataNucleus with DB4O embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
Basic Person Test35.127.035.427.035.227.0
Element Collection Test29.530.629.930.629.730.6
Inheritance Test33.427.033.527.033.427.0
Indexing Test41.031.641.932.141.531.9
Graph (Binary Tree) Testfailed28.5failed21.4failed25.0
Multithreading Testfailed33.9failed9.2failed21.5
All Tests34.829.835.224.635.027.2

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 Hibernate 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
 DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
Basic Person Test0.02214.21.38.30.6811.2
Element Collection Test0.0187.21.34.40.665.8
Inheritance Test0.01912.21.29.90.6311.0
Indexing Test0.02816.11.912.80.9414.5
Graph (Binary Tree) Testfailed7.0failed7.7failed7.3
Multithreading Testfailed19.6failed10.9failed15.2
All Tests0.02212.91.49.00.7311.0

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

A huge performance gap has been detected when using simple basic entities with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.022) to the normalized speed of Hibernate with H2 embedded database (14.2) reveals that in that case, Hibernate with H2 embedded is 645 times faster than DataNucleus with DB4O embedded.

Other Head to Head DBMS/JPA Comparisons