Compare with

Comparison of DataNucleus with Derby embedded vs Hibernate with HSQLDB 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
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
Basic Person Test9.7stopped8.2stopped8.9stopped
Element Collection Test6.1stopped4.0stopped5.1stopped
Inheritance Test5.6stopped10.7stopped8.2stopped
Indexing Test10.0stopped10.8stopped10.4stopped
Graph (Binary Tree) Test2.9stopped2.8stopped2.9stopped
Multithreading Test8.3stopped0.0000stopped4.2stopped
All Tests7.1stopped6.1stopped6.6stopped

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
 DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
Basic Person Test3.9stopped6.4stopped5.1stopped
Element Collection Test3.5stopped6.4stopped4.9stopped
Inheritance Test4.2stopped6.1stopped5.1stopped
Indexing Test3.3stopped5.7stopped4.5stopped
Graph (Binary Tree) Test3.2stopped5.1stopped4.2stopped
Multithreading Test2.4stopped8.7stopped5.5stopped
All Tests3.4stopped6.4stopped4.9stopped

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
 DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
Basic Person Test0.10stopped1.1stopped0.60stopped
Element Collection Test0.27stopped1.4stopped0.82stopped
Inheritance Test0.10stopped1.3stopped0.69stopped
Indexing Test0.12stopped1.1stopped0.63stopped
Multithreading Testfailedstoppedfailedstoppedfailedstopped
All Tests0.15stopped1.2stopped0.68stopped

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
 DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
Basic Person Test1.8stopped2.5stopped2.1stopped
Element Collection Test3.3stopped1.6stopped2.5stopped
Inheritance Test1.6stopped3.6stopped2.6stopped
Indexing Test4.8stopped4.0stopped4.4stopped
Graph (Binary Tree) Test2.6stopped1.6stopped2.1stopped
Multithreading Testfailedstoppedfailedstoppedfailedstopped
All Tests2.8stopped2.7stopped2.7stopped

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
 DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
Basic Person Test1.8stopped0.81stopped1.3stopped
Element Collection Test2.7stopped0.25stopped1.5stopped
Inheritance Test2.0stopped0.59stopped1.3stopped
Indexing Test3.4stopped0.57stopped2.0stopped
Graph (Binary Tree) Test4.2stopped5.9stopped5.0stopped
Multithreading Test6.7stopped0.0000stopped3.4stopped
All Tests3.5stopped1.3stopped2.4stopped

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
 DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
DataNucleus
Derby embedded
Hibernate
HSQLDB server
Basic Person Test3.4stopped3.8stopped3.6stopped
Element Collection Test3.2stopped2.7stopped2.9stopped
Inheritance Test2.7stopped4.4stopped3.6stopped
Indexing Test4.3stopped4.4stopped4.4stopped
Graph (Binary Tree) Test3.2stopped3.8stopped3.5stopped
Multithreading Test5.8stopped2.9stopped4.3stopped
All Tests3.6stopped3.7stopped3.7stopped

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