Compare with

Comparison of OpenJPA with PostgreSQL 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
PostgreSQL server
DataNucleus
DB4O embedded
OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
Basic Person Test5.20.0594.81.35.00.69
Element Collection Test2.80.0452.21.02.50.52
Inheritance Test4.60.0513.20.853.90.45
Indexing Test7.40.0806.92.37.11.2
Graph (Binary Tree) Test0.98failed0.81failed0.89failed
Multithreading Test23.4failed9.1failed16.2failed
All Tests7.40.0594.51.45.90.71

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

The results above show that in general OpenJPA with PostgreSQL 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 PostgreSQL database server (5.9) reveals that in these tests, OpenJPA with PostgreSQL server is 8.3 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.080) to the normalized speed of OpenJPA with PostgreSQL database server (7.4) reveals that in that case, OpenJPA with PostgreSQL server is 92.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
 OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
Basic Person Test5.80.004716.11.810.90.90
Element Collection Test0.0130.00388.71.54.40.77
Inheritance Test5.20.003517.62.211.41.1
Indexing Test4.80.004318.71.811.80.89
Graph (Binary Tree) Test0.27failed0.35failed0.31failed
Multithreading Test11.9failed23.3failed17.6failed
All Tests4.70.004114.11.89.40.91

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

The results above show that in general OpenJPA with PostgreSQL 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 PostgreSQL database server (9.4) reveals that in these tests, OpenJPA with PostgreSQL server is 10.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 OpenJPA with PostgreSQL database server (5.2) reveals that in that case, OpenJPA with PostgreSQL server is 1,486 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
PostgreSQL server
DataNucleus
DB4O embedded
OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
Basic Person Testfailedfailedfailedfailedfailedfailed
Element Collection Testfailedfailedfailedfailedfailedfailed
Inheritance Testfailedfailedfailedfailedfailedfailed
Indexing Testfailedfailedfailedfailedfailedfailed
Multithreading Testfailedfailedfailedfailedfailedfailed
All Testsfailedfailedfailedfailedfailedfailed

Speed comparison of JPA database update operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
Basic Person Test4.90.0123.90.764.40.39
Element Collection Test0.0330.0124.61.12.30.53
Inheritance Test4.80.0114.90.814.90.41
Indexing Test5.10.0116.01.35.60.64
Graph (Binary Tree) Test0.57failed0.31failed0.44failed
Multithreading Test22.2failed7.4failed14.8failed
All Tests6.30.0124.50.975.40.49

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

The results above show that in general OpenJPA with PostgreSQL server 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 OpenJPA with PostgreSQL database server (5.4) reveals that in these tests, OpenJPA with PostgreSQL server is 11.0 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 PostgreSQL database server (5.1) reveals that in that case, OpenJPA with PostgreSQL server is 464 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
PostgreSQL server
DataNucleus
DB4O embedded
OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
Basic Person Test4.60.0115.31.55.00.74
Element Collection Test0.0320.0102.81.61.40.80
Inheritance Test4.30.00934.61.14.40.57
Indexing Test8.00.0177.12.17.51.1
Graph (Binary Tree) Test0.53failed0.55failed0.54failed
Multithreading Test17.4failed9.1failed13.3failed
All Tests5.80.0124.91.65.40.79

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

The results above show that in general OpenJPA with PostgreSQL server 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 OpenJPA with PostgreSQL database server (5.4) reveals that in these tests, OpenJPA with PostgreSQL server is 6.8 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.017) to the normalized speed of OpenJPA with PostgreSQL database server (8.0) reveals that in that case, OpenJPA with PostgreSQL server is 471 times faster than DataNucleus with DB4O embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
OpenJPA
PostgreSQL server
DataNucleus
DB4O embedded
Basic Person Test5.10.0227.51.36.30.68
Element Collection Test0.720.0184.61.32.60.66
Inheritance Test4.70.0197.61.26.20.63
Indexing Test6.30.0289.71.98.00.94
Graph (Binary Tree) Test0.59failed0.50failed0.55failed
Multithreading Test18.7failed12.2failed15.5failed
All Tests6.00.0227.01.46.50.73

The results above show that in general OpenJPA with PostgreSQL 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 PostgreSQL database server (6.5) reveals that in these tests, OpenJPA with PostgreSQL server is 8.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/retrieval size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.019) to the normalized speed of OpenJPA with PostgreSQL database server (4.7) reveals that in that case, OpenJPA with PostgreSQL server is 247 times faster than DataNucleus with DB4O embedded.

Other Head to Head DBMS/JPA Comparisons