Compare with

Comparison of Hibernate with HSQLDB 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
HSQLDB embedded
DataNucleus
DB4O embedded
Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Basic Person Test32.60.05913.11.322.90.69
Element Collection Test15.10.0458.21.011.70.52
Inheritance Test25.50.05113.60.8519.50.45
Indexing Test29.60.08018.82.324.21.2
Graph (Binary Tree) Test13.8failed15.6failed14.7failed
Multithreading Test37.4failed13.0failed25.2failed
All Tests25.60.05913.71.419.70.71

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

The results above show that in general Hibernate with HSQLDB 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 HSQLDB embedded database (19.7) reveals that in these tests, Hibernate with HSQLDB embedded is 27.7 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.059) to the normalized speed of Hibernate with HSQLDB embedded database (32.6) reveals that in that case, Hibernate with HSQLDB embedded is 553 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
HSQLDB embedded
DataNucleus
DB4O embedded
Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Basic Person Test24.80.004716.41.820.60.90
Element Collection Test11.30.003810.81.511.00.77
Inheritance Test21.70.003521.02.221.31.1
Indexing Test11.90.004321.51.816.70.89
Graph (Binary Tree) Test3.6failed4.7failed4.1failed
Multithreading Test19.8failed21.5failed20.6failed
All Tests15.50.004116.01.815.70.91

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

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

A huge performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.0035) to the normalized speed of Hibernate with HSQLDB embedded database (21.7) reveals that in that case, Hibernate with HSQLDB embedded is 6,200 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
HSQLDB embedded
DataNucleus
DB4O embedded
Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Basic Person Test3.6failed0.88failed2.2failed
Element Collection Test3.4failed1.7failed2.6failed
Inheritance Test2.9failed1.0failed1.9failed
Indexing Test9.9failed21.7failed15.8failed
Multithreading Test1.1failed0.58failed0.82failed
All Tests4.2failed5.2failed4.7failed

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
HSQLDB embedded
DataNucleus
DB4O embedded
Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Basic Person Test14.20.0125.00.769.60.39
Element Collection Test10.10.0125.61.17.80.53
Inheritance Test13.40.0117.50.8110.50.41
Indexing Test10.70.0116.11.38.40.64
Graph (Binary Tree) Test3.7failed2.5failed3.1failed
Multithreading Test23.9failed3.8failed13.9failed
All Tests12.70.0125.10.978.90.49

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

The results above show that in general Hibernate with HSQLDB 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 HSQLDB embedded database (8.9) reveals that in these tests, Hibernate with HSQLDB embedded is 18.2 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.011) to the normalized speed of Hibernate with HSQLDB embedded database (13.4) reveals that in that case, Hibernate with HSQLDB embedded is 1,218 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
HSQLDB embedded
DataNucleus
DB4O embedded
Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Basic Person Test26.10.01117.51.521.80.74
Element Collection Test9.10.0105.21.67.10.80
Inheritance Test21.40.009317.71.119.60.57
Indexing Test33.00.01716.32.124.71.1
Graph (Binary Tree) Test5.4failed8.2failed6.8failed
Multithreading Test38.5failed28.6failed33.5failed
All Tests22.30.01215.61.618.90.79

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

The results above show that in general Hibernate with HSQLDB 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 HSQLDB embedded database (18.9) reveals that in these tests, Hibernate with HSQLDB embedded is 23.9 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 HSQLDB embedded database (26.1) reveals that in that case, Hibernate with HSQLDB embedded is 2,373 times faster than DataNucleus with DB4O embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Basic Person Test41.435.141.435.441.435.2
Element Collection Test46.929.546.929.946.929.7
Inheritance Test41.433.441.433.541.433.4
Indexing Test48.441.049.241.948.841.5
Graph (Binary Tree) Test28.5failed21.4failed25.0failed
Multithreading Test51.9failed10.3failed31.1failed
All Tests43.134.835.135.239.135.0

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

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Hibernate
HSQLDB embedded
DataNucleus
DB4O embedded
Basic Person Test20.20.02210.61.315.40.68
Element Collection Test9.80.0186.31.38.00.66
Inheritance Test17.00.01912.21.214.60.63
Indexing Test19.00.02816.91.918.00.94
Graph (Binary Tree) Test6.6failed7.8failed7.2failed
Multithreading Test24.1failed13.5failed18.8failed
All Tests16.50.02211.31.413.90.73

The results above show that in general Hibernate with HSQLDB 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 HSQLDB embedded database (13.9) reveals that in these tests, Hibernate with HSQLDB embedded is 19.0 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 HSQLDB embedded database (20.2) reveals that in that case, Hibernate with HSQLDB embedded is 918 times faster than DataNucleus with DB4O embedded.

Other Head to Head DBMS/JPA Comparisons