Compare with

Comparison of Hibernate with HSQLDB 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
HSQLDB server
DataNucleus
SQLite embedded
Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Basic Person Teststopped stopped stopped 
Element Collection Teststopped stopped stopped 
Inheritance Teststopped stopped stopped 
Indexing Teststopped stopped stopped 
Graph (Binary Tree) Teststopped stopped stopped 
Multithreading Teststopped stopped stopped 
All Testsstopped stopped stopped 

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Basic Person Teststopped0.43stopped stopped0.43
Element Collection Teststopped stopped stopped 
Inheritance Teststopped stopped stopped 
Indexing Teststopped stopped stopped 
Graph (Binary Tree) Teststopped stopped stopped 
Multithreading Teststopped stopped stopped 
All Testsstopped0.43stopped stopped0.43

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Basic Person Teststoppedfailedstopped stoppedfailed
Element Collection Teststopped stopped stopped 
Inheritance Teststopped stopped stopped 
Indexing Teststopped stopped stopped 
Multithreading Teststopped stopped stopped 
All Testsstoppedfailedstopped stoppedfailed

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Basic Person Teststopped0.025stopped stopped0.025
Element Collection Teststopped stopped stopped 
Inheritance Teststopped stopped stopped 
Indexing Teststopped stopped stopped 
Graph (Binary Tree) Teststopped stopped stopped 
Multithreading Teststopped stopped stopped 
All Testsstopped0.025stopped stopped0.025

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Basic Person Teststopped0.17stopped stopped0.17
Element Collection Teststopped stopped stopped 
Inheritance Teststopped stopped stopped 
Indexing Teststopped stopped stopped 
Graph (Binary Tree) Teststopped stopped stopped 
Multithreading Teststopped stopped stopped 
All Testsstopped0.17stopped stopped0.17

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Hibernate
HSQLDB server
DataNucleus
SQLite embedded
Basic Person Teststopped0.21stopped stopped0.21
Element Collection Teststopped stopped stopped 
Inheritance Teststopped stopped stopped 
Indexing Teststopped stopped stopped 
Graph (Binary Tree) Teststopped stopped stopped 
Multithreading Teststopped stopped stopped 
All Testsstopped0.21stopped stopped0.21

The results above show that in general DataNucleus with SQLite embedded is much more efficient than Hibernate with HSQLDB server in performing JPA database operations. Comparing the normalized speed of Hibernate with HSQLDB database server (0.0000) to the normalized speed of DataNucleus with SQLite embedded database (0.21) reveals that in these tests, DataNucleus with SQLite embedded is ? times faster than Hibernate with HSQLDB server.

A huge performance gap has been detected when using simple basic entities with small transaction/retrieval size. Comparing the normalized speed of Hibernate with HSQLDB database server (0.0000) to the normalized speed of DataNucleus with SQLite embedded database (0.21) reveals that in that case, DataNucleus with SQLite embedded is ? times faster than Hibernate with HSQLDB server.

Other Head to Head DBMS/JPA Comparisons