Compare with

Comparison of DataNucleus with DB4O embedded vs Hibernate with MySQL server

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
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
Basic Person Test0.0593.61.31.60.692.6
Element Collection Test0.0451.61.00.720.521.1
Inheritance Test0.0513.70.851.60.452.7
Indexing Test0.0805.42.32.61.24.0
Graph (Binary Tree) Testfailed1.5failed1.2failed1.4
Multithreading Testfailed7.4failed2.9failed5.2
All Tests0.0593.91.41.80.712.8

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
 DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
Basic Person Test0.00473.01.811.00.907.0
Element Collection Test0.00380.341.51.20.770.79
Inheritance Test0.00351.32.214.51.17.9
Indexing Test0.00432.51.812.80.897.6
Graph (Binary Tree) Testfailed0.55failed0.71failed0.63
Multithreading Testfailed0.23failed13.8failed7.0
All Tests0.00411.31.89.00.915.2

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
 DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
Basic Person Testfailed10.0failed2.0failed6.0
Element Collection Testfailed6.7failed0.53failed3.6
Inheritance Testfailed2.8failed1.6failed2.2
Indexing Testfailed0.44failed2.0failed1.2
Multithreading Testfailed2.1failed0.98failed1.5
All Testsfailed4.4failed1.4failed2.9

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
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
Basic Person Test0.0120.730.761.60.391.2
Element Collection Test0.0120.391.11.20.530.78
Inheritance Test0.0110.610.812.10.411.4
Indexing Test0.0110.811.32.60.641.7
Graph (Binary Tree) Testfailed0.69failed0.40failed0.54
Multithreading Testfailed0.63failed3.0failed1.8
All Tests0.0120.640.971.80.491.2

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
 DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
Basic Person Test0.0111.11.51.70.741.4
Element Collection Test0.0100.211.60.530.800.37
Inheritance Test0.00930.651.11.80.571.2
Indexing Test0.0170.812.12.01.11.4
Graph (Binary Tree) Testfailed0.55failed0.62failed0.58
Multithreading Testfailed0.35failed4.1failed2.2
All Tests0.0120.611.61.80.791.2

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
 DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
DataNucleus
DB4O embedded
Hibernate
MySQL server
Basic Person Test0.0223.71.33.60.683.6
Element Collection Test0.0181.81.30.840.661.3
Inheritance Test0.0191.81.24.30.633.1
Indexing Test0.0282.01.94.40.943.2
Graph (Binary Tree) Testfailed0.83failed0.73failed0.78
Multithreading Testfailed2.1failed5.0failed3.6
All Tests0.0222.11.43.20.732.7

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