Compare with

Comparison of DataNucleus with SQLite embedded vs Hibernate with HSQLDB 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
 DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
Basic Person Test 12.5 11.4 12.0
Element Collection Test 12.1 11.9 12.0
Inheritance Test 9.4 10.3 9.8
Indexing Test 15.0 13.5 14.2
Graph (Binary Tree) Test 6.8 7.7 7.3
Multithreading Test 12.1 0.0000 6.0
All Tests 11.3 9.1 10.2

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
Basic Person Test0.4314.1 19.70.4316.9
Element Collection Test 4.2 11.4 7.8
Inheritance Test 16.0 24.9 20.4
Indexing Test 9.8 27.0 18.4
Graph (Binary Tree) Test 3.7 5.1 4.4
Multithreading Test 17.3 19.2 18.2
All Tests0.4310.8 17.90.4314.4

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

A huge 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 HSQLDB embedded database (14.1) reveals that in that case, Hibernate with HSQLDB embedded is 32.8 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
HSQLDB embedded
DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
Basic Person Testfailed1.1 3.6failed2.4
Element Collection Test 1.6 5.3 3.5
Inheritance Test 0.64 6.0 3.3
Indexing Test 13.1 21.5 17.3
Multithreading Test 0.59 1.8 1.2
All Testsfailed3.4 7.7failed5.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
HSQLDB embedded
DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
Basic Person Test0.02510.9 6.80.0258.8
Element Collection Test 15.5 5.8 10.7
Inheritance Test 10.9 9.9 10.4
Indexing Test 28.7 10.4 19.5
Graph (Binary Tree) Test 4.9 4.1 4.5
Multithreading Test 6.4 4.8 5.6
All Tests0.02512.9 7.00.0259.9

The results above show that in general Hibernate with HSQLDB embedded 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 HSQLDB embedded database (9.9) reveals that in these tests, Hibernate with HSQLDB embedded is 396 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 HSQLDB embedded database (10.9) reveals that in that case, Hibernate with HSQLDB embedded is 436 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
HSQLDB embedded
DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
Basic Person Test0.1737.3 28.20.1732.7
Element Collection Test 31.8 4.0 17.9
Inheritance Test 41.5 18.4 29.9
Indexing Test 86.3 19.6 53.0
Graph (Binary Tree) Test 21.3 65.0 43.2
Multithreading Test 17.7 0.0000 8.8
All Tests0.1739.3 22.50.1730.9

The results above show that in general Hibernate with HSQLDB embedded 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 HSQLDB embedded database (30.9) reveals that in these tests, Hibernate with HSQLDB embedded is 182 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 HSQLDB embedded database (37.3) reveals that in that case, Hibernate with HSQLDB embedded is 219 times faster than DataNucleus with SQLite embedded.

Comparison of database storage efficiency (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
Basic Person Test 100 100 100
Element Collection Test 49.8 49.8 49.8
Inheritance Test 95.0 100 97.5
Indexing Test 100 100 100
Graph (Binary Tree) Test 100 100 100
Multithreading Test 100 100 100
All Tests 90.8 91.6 91.2

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
DataNucleus
SQLite embedded
Hibernate
HSQLDB embedded
Basic Person Test0.2115.2 13.90.2114.6
Element Collection Test 13.0 7.7 10.4
Inheritance Test 15.7 13.9 14.8
Indexing Test 30.6 18.4 24.5
Graph (Binary Tree) Test 9.2 20.5 14.8
Multithreading Test 10.8 5.2 8.0
All Tests0.2116.0 13.00.2114.5

The results above show that in general Hibernate with HSQLDB embedded 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 HSQLDB embedded database (14.5) reveals that in these tests, Hibernate with HSQLDB embedded is 69.0 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 HSQLDB embedded database (15.2) reveals that in that case, Hibernate with HSQLDB embedded is 72.4 times faster than DataNucleus with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons