Compare with

Comparison of OpenJPA 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
 OpenJPA
MySQL server
DataNucleus
DB4O embedded
OpenJPA
MySQL server
DataNucleus
DB4O embedded
OpenJPA
MySQL server
DataNucleus
DB4O embedded
Basic Person Test3.90.0591.61.32.70.69
Element Collection Test1.60.0450.681.01.10.52
Inheritance Test3.60.0511.40.852.50.45
Indexing Test5.60.0802.42.34.01.2
Graph (Binary Tree) Test0.68failed0.57failed0.63failed
Multithreading Test7.2failed2.7failed4.9failed
All Tests3.70.0591.51.42.60.71

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

The results above show that in general OpenJPA 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 OpenJPA with MySQL database server (2.6) reveals that in these tests, OpenJPA with MySQL server is 3.7 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 OpenJPA with MySQL database server (3.6) reveals that in that case, OpenJPA with MySQL server is 70.6 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
 OpenJPA
MySQL server
DataNucleus
DB4O embedded
OpenJPA
MySQL server
DataNucleus
DB4O embedded
OpenJPA
MySQL server
DataNucleus
DB4O embedded
Basic Person Test3.20.004722.71.812.90.90
Element Collection Test0.00380.00382.91.51.40.77
Inheritance Test0.0170.00356.92.23.41.1
Indexing Test2.40.004323.41.812.90.89
Graph (Binary Tree) Test0.27failed0.35failed0.31failed
Multithreading Test0.14failed18.1failed9.1failed
All Tests1.00.004112.41.86.70.91

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

The results above show that in general OpenJPA 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 OpenJPA with MySQL database server (6.7) reveals that in these tests, OpenJPA with MySQL server is 7.4 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 OpenJPA with MySQL database server (3.2) reveals that in that case, OpenJPA with MySQL server is 681 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
 OpenJPA
MySQL server
DataNucleus
DB4O embedded
OpenJPA
MySQL server
DataNucleus
DB4O embedded
OpenJPA
MySQL server
DataNucleus
DB4O embedded
Basic Person Test9.3failed2.2failed5.8failed
Element Collection Test4.8failed1.1failed2.9failed
Inheritance Test1.5failed0.90failed1.2failed
Indexing Test0.31failed2.1failed1.2failed
Multithreading Test1.9failed0.99failed1.4failed
All Tests3.6failed1.5failed2.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
 OpenJPA
MySQL server
DataNucleus
DB4O embedded
OpenJPA
MySQL server
DataNucleus
DB4O embedded
OpenJPA
MySQL server
DataNucleus
DB4O embedded
Basic Person Test0.740.0121.60.761.20.39
Element Collection Test0.0140.0121.71.10.870.53
Inheritance Test0.0480.0112.00.811.00.41
Indexing Test0.740.0113.01.31.90.64
Graph (Binary Tree) Test0.45failed0.25failed0.35failed
Multithreading Test0.55failed2.9failed1.7failed
All Tests0.420.0121.90.971.20.49

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

The results above show that in general OpenJPA 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 OpenJPA with MySQL database server (1.2) reveals that in these tests, OpenJPA 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 OpenJPA with MySQL database server (0.74) reveals that in that case, OpenJPA with MySQL server is 67.3 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
 OpenJPA
MySQL server
DataNucleus
DB4O embedded
OpenJPA
MySQL server
DataNucleus
DB4O embedded
OpenJPA
MySQL server
DataNucleus
DB4O embedded
Basic Person Test0.980.0111.71.51.40.74
Element Collection Test0.00990.0100.651.60.330.80
Inheritance Test0.0330.00931.51.10.750.57
Indexing Test0.640.0172.02.11.31.1
Graph (Binary Tree) Test0.41failed0.43failed0.42failed
Multithreading Test0.27failed2.9failed1.6failed
All Tests0.390.0121.51.60.960.79

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

The results above show that in general OpenJPA with MySQL server is slightly 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 OpenJPA with MySQL database server (0.98) reveals that in that case, OpenJPA with MySQL server is 89.1 times faster than DataNucleus with DB4O embedded.

On the other hand, OpenJPA with MySQL server is slower, for instance, when using JPA element collections with large transaction size. Comparing the normalized speed of OpenJPA with MySQL database server (0.65) to the normalized speed of DataNucleus with DB4O embedded database (1.6) reveals that in that case, OpenJPA with MySQL server is 2.5 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
 OpenJPA
MySQL server
DataNucleus
DB4O embedded
OpenJPA
MySQL server
DataNucleus
DB4O embedded
OpenJPA
MySQL server
DataNucleus
DB4O embedded
Basic Person Test3.60.0226.01.34.80.68
Element Collection Test1.30.0181.41.31.30.66
Inheritance Test1.00.0192.51.21.80.63
Indexing Test1.90.0286.61.94.30.94
Graph (Binary Tree) Test0.45failed0.40failed0.43failed
Multithreading Test2.0failed5.5failed3.8failed
All Tests1.80.0223.91.42.80.73

The results above show that in general OpenJPA 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 OpenJPA with MySQL database server (2.8) reveals that in these tests, OpenJPA with MySQL server is 3.8 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 OpenJPA with MySQL database server (3.6) reveals that in that case, OpenJPA with MySQL server is 164 times faster than DataNucleus with DB4O embedded.

Other Head to Head DBMS/JPA Comparisons