Compare with

Comparison of Hibernate with MySQL server 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
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Basic Person Test3.60.0591.61.32.60.69
Element Collection Test1.60.0450.721.01.10.52
Inheritance Test3.70.0511.60.852.70.45
Indexing Test5.40.0802.62.34.01.2
Graph (Binary Tree) Test1.5failed1.2failed1.4failed
Multithreading Test7.4failed2.9failed5.2failed
All Tests3.90.0591.81.42.80.71

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

The results above show that in general Hibernate with MySQL server 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 MySQL database server (2.8) reveals that in these tests, Hibernate with MySQL server is 3.9 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 MySQL database server (3.7) reveals that in that case, Hibernate with MySQL server is 72.5 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
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Basic Person Test3.00.004711.01.87.00.90
Element Collection Test0.340.00381.21.50.790.77
Inheritance Test1.30.003514.52.27.91.1
Indexing Test2.50.004312.81.87.60.89
Graph (Binary Tree) Test0.55failed0.71failed0.63failed
Multithreading Test0.23failed13.8failed7.0failed
All Tests1.30.00419.01.85.20.91

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

The results above show that in general Hibernate with MySQL server 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 MySQL database server (5.2) reveals that in these tests, Hibernate with MySQL server is 5.7 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 MySQL database server (3.0) reveals that in that case, Hibernate with MySQL server is 638 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
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Basic Person Test10.0failed2.0failed6.0failed
Element Collection Test6.7failed0.53failed3.6failed
Inheritance Test2.8failed1.6failed2.2failed
Indexing Test0.44failed2.0failed1.2failed
Multithreading Test2.1failed0.98failed1.5failed
All Tests4.4failed1.4failed2.9failed

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
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Basic Person Test0.730.0121.60.761.20.39
Element Collection Test0.390.0121.21.10.780.53
Inheritance Test0.610.0112.10.811.40.41
Indexing Test0.810.0112.61.31.70.64
Graph (Binary Tree) Test0.69failed0.40failed0.54failed
Multithreading Test0.63failed3.0failed1.8failed
All Tests0.640.0121.80.971.20.49

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

The results above show that in general Hibernate with MySQL server is 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 MySQL database server (1.2) reveals that in these tests, Hibernate with MySQL server is 2.4 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.011) to the normalized speed of Hibernate with MySQL database server (0.81) reveals that in that case, Hibernate with MySQL server is 73.6 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
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Basic Person Test1.10.0111.71.51.40.74
Element Collection Test0.210.0100.531.60.370.80
Inheritance Test0.650.00931.81.11.20.57
Indexing Test0.810.0172.02.11.41.1
Graph (Binary Tree) Test0.55failed0.62failed0.58failed
Multithreading Test0.35failed4.1failed2.2failed
All Tests0.610.0121.81.61.20.79

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

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

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 MySQL database server (1.1) reveals that in that case, Hibernate with MySQL server is 100 times faster than DataNucleus with DB4O embedded.

On the other hand, Hibernate with MySQL server is slower, for instance, when using JPA element collections with large transaction size. Comparing the normalized speed of Hibernate with MySQL database server (0.53) to the normalized speed of DataNucleus with DB4O embedded database (1.6) reveals that in that case, Hibernate with MySQL server is 3.0 times slower than DataNucleus with DB4O embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Basic Person Test3.70.0223.61.33.60.68
Element Collection Test1.80.0180.841.31.30.66
Inheritance Test1.80.0194.31.23.10.63
Indexing Test2.00.0284.41.93.20.94
Graph (Binary Tree) Test0.83failed0.73failed0.78failed
Multithreading Test2.1failed5.0failed3.6failed
All Tests2.10.0223.21.42.70.73

The results above show that in general Hibernate with MySQL server 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 MySQL database server (2.7) reveals that in these tests, Hibernate with MySQL server is 3.7 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 MySQL database server (3.7) reveals that in that case, Hibernate with MySQL server is 168 times faster than DataNucleus with DB4O embedded.

Other Head to Head DBMS/JPA Comparisons