Compare with

Comparison of DataNucleus with SQLite embedded vs Hibernate 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
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
Basic Person Test 8.0 5.6 6.8
Element Collection Test 8.3 7.7 8.0
Inheritance Test 5.2 8.7 7.0
Indexing Test 9.0 10.4 9.7
Graph (Binary Tree) Test 5.6 5.5 5.6
Multithreading Test 10.4 0.0000 5.2
All Tests 7.8 6.3 7.0

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
Basic Person Test0.431.3 5.70.433.5
Element Collection Test 0.47 0.50 0.48
Inheritance Test 1.6 5.1 3.3
Indexing Test 1.6 5.7 3.7
Graph (Binary Tree) Test 0.19 0.32 0.26
Multithreading Test 2.9 9.1 6.0
All Tests0.431.3 4.40.432.9

The results above show that in general Hibernate 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 Hibernate with Derby database server (2.9) reveals that in these tests, Hibernate with Derby server is 6.7 times faster than DataNucleus with SQLite embedded.

A large performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.43) to the normalized speed of Hibernate with Derby database server (1.3) reveals that in that case, Hibernate with Derby server is 3.0 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
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
Basic Person Testfailed0.40 1.8failed1.1
Element Collection Test 0.67 0.62 0.65
Inheritance Test 0.39 2.0 1.2
Indexing Test 1.1 2.4 1.7
Multithreading Test 2.5 3.5 3.0
All Testsfailed1.0 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
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
Basic Person Test0.0251.1 1.90.0251.5
Element Collection Test 2.5 1.1 1.8
Inheritance Test 1.5 2.4 2.0
Indexing Test 3.9 2.5 3.2
Graph (Binary Tree) Test 0.92 0.52 0.72
Multithreading Test 1.7 1.6 1.6
All Tests0.0251.9 1.70.0251.8

The results above show that in general Hibernate 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 Hibernate with Derby database server (1.8) reveals that in these tests, Hibernate with Derby server is 72.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 Hibernate with Derby database server (1.1) reveals that in that case, Hibernate with Derby server is 44.0 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
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
Basic Person Test0.1712.4 17.20.1714.8
Element Collection Test 6.7 1.1 3.9
Inheritance Test 11.6 11.1 11.4
Indexing Test 22.6 9.8 16.2
Graph (Binary Tree) Test 7.7 8.1 7.9
Multithreading Test 7.3 0.0000 3.7
All Tests0.1711.4 7.90.179.6

The results above show that in general Hibernate 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 Hibernate with Derby database server (9.6) reveals that in these tests, Hibernate with Derby server is 56.5 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 Hibernate with Derby database server (12.4) reveals that in that case, Hibernate with Derby server is 72.9 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
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
Basic Person Test0.214.6 6.40.215.5
Element Collection Test 3.7 2.2 3.0
Inheritance Test 4.0 5.9 5.0
Indexing Test 7.6 6.2 6.9
Graph (Binary Tree) Test 3.6 3.6 3.6
Multithreading Test 4.9 2.8 3.9
All Tests0.214.8 4.60.214.7

The results above show that in general Hibernate 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 Hibernate with Derby database server (4.7) reveals that in these tests, Hibernate with Derby server is 22.4 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 Hibernate with Derby database server (4.6) reveals that in that case, Hibernate with Derby server is 21.9 times faster than DataNucleus with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons