Compare with

Comparison of DataNucleus with SQLite embedded vs OpenJPA with Derby 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
SQLite embedded
OpenJPA
Derby server
DataNucleus
SQLite embedded
OpenJPA
Derby server
DataNucleus
SQLite embedded
OpenJPA
Derby server
Basic Person Test 6.3 6.8 6.5
Element Collection Test 7.0 5.4 6.2
Inheritance Test 3.8 6.0 4.9
Indexing Test 6.8 7.9 7.3
Graph (Binary Tree) Test 2.3 1.9 2.1
Multithreading Test 6.5 0.0000 3.2
All Tests 5.4 4.7 5.1

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
OpenJPA
Derby server
DataNucleus
SQLite embedded
OpenJPA
Derby server
DataNucleus
SQLite embedded
OpenJPA
Derby server
Basic Person Test0.430.42 5.80.433.1
Element Collection Test 0.23 6.5 3.4
Inheritance Test 0.29 4.3 2.3
Indexing Test 0.39 5.0 2.7
Graph (Binary Tree) Test 0.072 0.16 0.11
Multithreading Test 0.71 10.0 5.3
All Tests0.430.35 5.30.432.8

The results above show that in general OpenJPA with Derby server is much more efficient than DataNucleus with SQLite embedded in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.43) to the normalized speed of OpenJPA with Derby database server (2.8) reveals that in these tests, OpenJPA with Derby server is 6.5 times faster than DataNucleus with SQLite embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
OpenJPA
Derby server
DataNucleus
SQLite embedded
OpenJPA
Derby server
DataNucleus
SQLite embedded
OpenJPA
Derby server
Basic Person Testfailed0.37 2.1failed1.2
Element Collection Test 0.23 0.67 0.45
Inheritance Test 0.095 0.80 0.45
Indexing Test 0.76 3.0 1.9
Multithreading Test 2.6 4.2 3.4
All Testsfailed0.81 2.1failed1.5

DataNucleus with SQLite embedded has failed in 1 tests (see exceptions).

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
OpenJPA
Derby server
DataNucleus
SQLite embedded
OpenJPA
Derby server
DataNucleus
SQLite embedded
OpenJPA
Derby server
Basic Person Test0.0250.81 2.80.0251.8
Element Collection Test 0.99 3.6 2.3
Inheritance Test 0.51 3.3 1.9
Indexing Test 2.4 4.4 3.4
Graph (Binary Tree) Test 0.32 0.31 0.32
Multithreading Test 1.4 4.1 2.7
All Tests0.0251.1 3.10.0252.1

The results above show that in general OpenJPA with Derby server is much more efficient than DataNucleus with SQLite embedded in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.025) to the normalized speed of OpenJPA with Derby database server (2.1) reveals that in these tests, OpenJPA with Derby server is 84.0 times faster than DataNucleus with SQLite embedded.

A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.025) to the normalized speed of OpenJPA with Derby database server (0.81) reveals that in that case, OpenJPA with Derby server is 32.4 times faster than DataNucleus with SQLite embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
OpenJPA
Derby server
DataNucleus
SQLite embedded
OpenJPA
Derby server
DataNucleus
SQLite embedded
OpenJPA
Derby server
Basic Person Test0.174.5 9.10.176.8
Element Collection Test 3.4 1.9 2.7
Inheritance Test 3.8 4.8 4.3
Indexing Test 10.1 5.1 7.6
Graph (Binary Tree) Test 3.0 5.5 4.3
Multithreading Test 5.1 0.0000 2.5
All Tests0.175.0 4.40.174.7

The results above show that in general OpenJPA with Derby server is much more efficient than DataNucleus with SQLite embedded in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.17) to the normalized speed of OpenJPA with Derby database server (4.7) reveals that in these tests, OpenJPA with Derby server is 27.6 times faster than DataNucleus with SQLite embedded.

A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.17) to the normalized speed of OpenJPA with Derby database server (4.5) reveals that in that case, OpenJPA with Derby server is 26.5 times faster than DataNucleus with SQLite embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
OpenJPA
Derby server
DataNucleus
SQLite embedded
OpenJPA
Derby server
DataNucleus
SQLite embedded
OpenJPA
Derby server
Basic Person Test0.212.5 5.30.213.9
Element Collection Test 2.4 3.6 3.0
Inheritance Test 1.7 3.8 2.8
Indexing Test 4.1 5.1 4.6
Graph (Binary Tree) Test 1.4 2.0 1.7
Multithreading Test 3.3 3.6 3.5
All Tests0.212.6 4.00.213.3

The results above show that in general OpenJPA with Derby server is much more efficient than DataNucleus with SQLite embedded in performing JPA database operations. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.21) to the normalized speed of OpenJPA with Derby database server (3.3) reveals that in these tests, OpenJPA with Derby server is 15.7 times faster than DataNucleus with SQLite 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 SQLite embedded database (0.21) to the normalized speed of OpenJPA with Derby database server (2.5) reveals that in that case, OpenJPA with Derby server is 11.9 times faster than DataNucleus with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons