Compare with

Comparison of Hibernate with HSQLDB server vs DataNucleus with Derby 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
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Basic Person Teststopped9.7stopped8.2stopped8.9
Element Collection Teststopped6.1stopped4.0stopped5.1
Inheritance Teststopped5.6stopped10.7stopped8.2
Indexing Teststopped10.0stopped10.8stopped10.4
Graph (Binary Tree) Teststopped2.9stopped2.8stopped2.9
Multithreading Teststopped8.3stopped0.0000stopped4.2
All Testsstopped7.1stopped6.1stopped6.6

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Basic Person Teststopped3.9stopped6.4stopped5.1
Element Collection Teststopped3.5stopped6.4stopped4.9
Inheritance Teststopped4.2stopped6.1stopped5.1
Indexing Teststopped3.3stopped5.7stopped4.5
Graph (Binary Tree) Teststopped3.2stopped5.1stopped4.2
Multithreading Teststopped2.4stopped8.7stopped5.5
All Testsstopped3.4stopped6.4stopped4.9

The results above show that in general DataNucleus with Derby 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 Derby embedded database (4.9) reveals that in these tests, DataNucleus with Derby 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
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Basic Person Teststopped0.10stopped1.1stopped0.60
Element Collection Teststopped0.27stopped1.4stopped0.82
Inheritance Teststopped0.10stopped1.3stopped0.69
Indexing Teststopped0.12stopped1.1stopped0.63
Multithreading Teststoppedfailedstoppedfailedstoppedfailed
All Testsstopped0.15stopped1.2stopped0.68

DataNucleus with Derby embedded has failed in 2 tests (see exceptions).

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Basic Person Teststopped1.8stopped2.5stopped2.1
Element Collection Teststopped3.3stopped1.6stopped2.5
Inheritance Teststopped1.6stopped3.6stopped2.6
Indexing Teststopped4.8stopped4.0stopped4.4
Graph (Binary Tree) Teststopped2.6stopped1.6stopped2.1
Multithreading Teststoppedfailedstoppedfailedstoppedfailed
All Testsstopped2.8stopped2.7stopped2.7

DataNucleus with Derby embedded has failed in 2 tests (see exceptions).

The results above show that in general DataNucleus with Derby 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 Derby embedded database (2.7) reveals that in these tests, DataNucleus with Derby 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
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Basic Person Teststopped1.8stopped0.81stopped1.3
Element Collection Teststopped2.7stopped0.25stopped1.5
Inheritance Teststopped2.0stopped0.59stopped1.3
Indexing Teststopped3.4stopped0.57stopped2.0
Graph (Binary Tree) Teststopped4.2stopped5.9stopped5.0
Multithreading Teststopped6.7stopped0.0000stopped3.4
All Testsstopped3.5stopped1.3stopped2.4

The results above show that in general DataNucleus with Derby 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 Derby embedded database (2.4) reveals that in these tests, DataNucleus with Derby 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
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Basic Person Teststopped3.4stopped3.8stopped3.6
Element Collection Teststopped3.2stopped2.7stopped2.9
Inheritance Teststopped2.7stopped4.4stopped3.6
Indexing Teststopped4.3stopped4.4stopped4.4
Graph (Binary Tree) Teststopped3.2stopped3.8stopped3.5
Multithreading Teststopped5.8stopped2.9stopped4.3
All Testsstopped3.6stopped3.7stopped3.7

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

Other Head to Head DBMS/JPA Comparisons