Compare with

Comparison of Hibernate 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
 Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Basic Person Test18.10.0599.01.313.50.69
Element Collection Test13.00.0456.81.09.90.52
Inheritance Test21.00.0519.40.8515.20.45
Indexing Test29.90.08018.42.324.11.2
Graph (Binary Tree) Test17.2failed20.1failed18.7failed
Multithreading Test36.9failed11.5failed24.2failed
All Tests22.60.05912.51.417.60.71

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
 Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Basic Person Test16.60.004713.31.815.00.90
Element Collection Test4.30.00384.01.54.10.77
Inheritance Test10.40.003517.52.213.91.1
Indexing Test10.80.004315.21.813.00.89
Graph (Binary Tree) Test2.5failed4.0failed3.3failed
Multithreading Test16.2failed15.7failed15.9failed
All Tests10.10.004111.61.810.90.91

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
 Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Basic Person Test4.5failed1.2failed2.8failed
Element Collection Test4.4failed1.4failed2.9failed
Inheritance Test3.1failed1.5failed2.3failed
Indexing Test6.6failed10.5failed8.6failed
Multithreading Test1.2failed0.59failed0.89failed
All Tests4.0failed3.0failed3.5failed

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
 Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Basic Person Test12.10.0126.50.769.30.39
Element Collection Test7.40.0125.31.16.30.53
Inheritance Test10.80.0118.50.819.60.41
Indexing Test10.00.0117.51.38.80.64
Graph (Binary Tree) Test4.4failed2.3failed3.4failed
Multithreading Test16.2failed4.0failed10.1failed
All Tests10.10.0125.70.977.90.49

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
 Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Basic Person Test19.70.01111.41.515.50.74
Element Collection Test6.90.0104.51.65.70.80
Inheritance Test15.60.009312.91.114.20.57
Indexing Test23.20.01712.42.117.81.1
Graph (Binary Tree) Test4.0failed4.2failed4.1failed
Multithreading Test27.4failed22.7failed25.0failed
All Tests16.10.01211.41.613.70.79

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
 Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
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.4failed25.0failed
Multithreading Test33.9failed9.2failed21.5failed
All Tests29.834.824.635.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 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
 Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Hibernate
H2 embedded
DataNucleus
DB4O embedded
Basic Person Test14.20.0228.31.311.20.68
Element Collection Test7.20.0184.41.35.80.66
Inheritance Test12.20.0199.91.211.00.63
Indexing Test16.10.02812.81.914.50.94
Graph (Binary Tree) Test7.0failed7.7failed7.3failed
Multithreading Test19.6failed10.9failed15.2failed
All Tests12.90.0229.01.411.00.73

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