Compare with

Comparison of Hibernate with Derby server vs DataNucleus with SQLite 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
 Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Basic Person Test8.0 5.6 6.8 
Element Collection Test8.3 7.7 8.0 
Inheritance Test5.2 8.7 7.0 
Indexing Test9.0 10.4 9.7 
Graph (Binary Tree) Test5.6 5.5 5.6 
Multithreading Test10.4 0.0000 5.2 
All Tests7.8 6.3 7.0 

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Basic Person Test1.30.435.7 3.50.43
Element Collection Test0.47 0.50 0.48 
Inheritance Test1.6 5.1 3.3 
Indexing Test1.6 5.7 3.7 
Graph (Binary Tree) Test0.19 0.32 0.26 
Multithreading Test2.9 9.1 6.0 
All Tests1.30.434.4 2.90.43

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
 Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Basic Person Test0.40failed1.8 1.1failed
Element Collection Test0.67 0.62 0.65 
Inheritance Test0.39 2.0 1.2 
Indexing Test1.1 2.4 1.7 
Multithreading Test2.5 3.5 3.0 
All Tests1.0failed2.1 1.5failed

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
 Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Basic Person Test1.10.0251.9 1.50.025
Element Collection Test2.5 1.1 1.8 
Inheritance Test1.5 2.4 2.0 
Indexing Test3.9 2.5 3.2 
Graph (Binary Tree) Test0.92 0.52 0.72 
Multithreading Test1.7 1.6 1.6 
All Tests1.90.0251.7 1.80.025

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
 Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Basic Person Test12.40.1717.2 14.80.17
Element Collection Test6.7 1.1 3.9 
Inheritance Test11.6 11.1 11.4 
Indexing Test22.6 9.8 16.2 
Graph (Binary Tree) Test7.7 8.1 7.9 
Multithreading Test7.3 0.0000 3.7 
All Tests11.40.177.9 9.60.17

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
 Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Hibernate
Derby server
DataNucleus
SQLite embedded
Basic Person Test4.60.216.4 5.50.21
Element Collection Test3.7 2.2 3.0 
Inheritance Test4.0 5.9 5.0 
Indexing Test7.6 6.2 6.9 
Graph (Binary Tree) Test3.6 3.6 3.6 
Multithreading Test4.9 2.8 3.9 
All Tests4.80.214.6 4.70.21

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