Compare with

Comparison of Hibernate with SQLite embedded vs DataNucleus 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
 Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Basic Person Test0.08314.21.04.80.559.5
Element Collection Test0.0676.60.692.10.384.3
Inheritance Test0.08013.60.994.60.549.1
Indexing Test0.09824.61.011.10.5517.8
Graph (Binary Tree) Test0.276.80.964.50.615.7
Multithreading Testfailed38.5failed8.5failed23.5
All Tests0.1217.40.935.90.5311.7

Hibernate with SQLite embedded has failed in 2 tests (see exceptions).

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

A huge performance gap has been detected when using database indexes with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.098) to the normalized speed of DataNucleus with HSQLDB embedded database (24.6) reveals that in that case, DataNucleus with HSQLDB embedded is 251 times faster than Hibernate with SQLite embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Basic Person Test1.86.61.310.21.58.4
Element Collection Test0.00083.6failed8.10.00085.8
Inheritance Test2.45.71.48.81.97.2
Indexing Test1.95.12.39.52.17.3
Graph (Binary Tree) Test0.567.20.889.30.728.3
Multithreading Testfailed8.1failed9.5failed8.8
All Tests1.36.01.59.21.47.6

Hibernate with SQLite embedded has failed in 3 tests (see exceptions).

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

A huge performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0008) to the normalized speed of DataNucleus with HSQLDB embedded database (3.6) reveals that in that case, DataNucleus with HSQLDB embedded is 4,500 times faster than Hibernate with SQLite embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Basic Person Test1.11.40.220.480.650.95
Element Collection Test0.391.3failed0.670.391.0
Inheritance Test0.531.60.280.610.401.1
Indexing Test0.00110.00160.430.630.210.32
Multithreading Testfailed0.40failedfailedfailed0.40
All Tests0.500.960.310.600.420.80

Hibernate with SQLite embedded has failed in 3 tests (see exceptions). DataNucleus with HSQLDB embedded has failed in 1 tests (see exceptions).

The results above show that in general DataNucleus with HSQLDB embedded is more efficient than Hibernate with SQLite embedded in executing the tested JPA queries.

A large performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.39) to the normalized speed of DataNucleus with HSQLDB embedded database (1.3) reveals that in that case, DataNucleus with HSQLDB embedded is 3.3 times faster than Hibernate with SQLite embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Basic Person Test0.07611.50.652.70.377.1
Element Collection Test0.00226.9failed2.70.00224.8
Inheritance Test0.07910.30.973.60.536.9
Indexing Test0.05711.40.544.40.307.9
Graph (Binary Tree) Test0.263.50.421.50.342.5
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.0948.70.653.00.345.8

Hibernate with SQLite embedded has failed in 3 tests (see exceptions). DataNucleus with HSQLDB embedded has failed in 2 tests (see exceptions).

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

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0022) to the normalized speed of DataNucleus with HSQLDB embedded database (6.9) reveals that in that case, DataNucleus with HSQLDB embedded is 3,136 times faster than Hibernate with SQLite embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Basic Person Test0.0614.20.911.30.492.8
Element Collection Test0.00074.9failed1.60.00073.2
Inheritance Test0.0584.00.901.30.482.7
Indexing Test0.0797.50.541.90.314.7
Graph (Binary Tree) Test0.242.90.802.00.522.5
Multithreading Testfailed40.1failed13.7failed26.9
All Tests0.08810.60.793.70.407.1

Hibernate with SQLite embedded has failed in 3 tests (see exceptions).

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

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0007) to the normalized speed of DataNucleus with HSQLDB embedded database (4.9) reveals that in that case, DataNucleus with HSQLDB embedded is 7,000 times faster than Hibernate with SQLite embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Basic Person Test90.241.490.241.490.241.4
Element Collection Test82.023.482.023.482.023.4
Inheritance Test80.541.480.541.480.541.4
Indexing Test93.448.494.849.294.148.8
Graph (Binary Tree) Test67.912.550.99.459.410.9
Multithreading Testfailed51.9failed10.3failed31.1
All Tests82.836.579.729.281.232.9

Hibernate with SQLite embedded has failed in 2 tests (see exceptions).

The results above show that in general Hibernate with SQLite embedded is more efficient than DataNucleus with HSQLDB embedded in using disk space. Comparing the normalized score of DataNucleus with HSQLDB embedded database (32.9) to the normalized score of Hibernate with SQLite embedded database (81.2) reveals that in these tests, Hibernate with SQLite embedded is 2.5 times more efficient than DataNucleus with HSQLDB embedded.

A large gap has been detected when using graphs of objects with small transaction size. Comparing the normalized score of DataNucleus with HSQLDB embedded database (12.5) to the normalized score of Hibernate with SQLite embedded database (67.9) reveals that in that case, Hibernate with SQLite embedded is 5.4 times more efficient than DataNucleus with HSQLDB embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Hibernate
SQLite embedded
DataNucleus
HSQLDB embedded
Basic Person Test0.637.60.813.90.725.7
Element Collection Test0.0924.70.693.00.193.8
Inheritance Test0.637.10.913.80.775.4
Indexing Test0.429.70.965.50.697.6
Graph (Binary Tree) Test0.335.10.774.30.554.7
Multithreading Testfailed21.8failed10.6failed17.0
All Tests0.429.00.864.80.627.0

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

A huge performance gap has been detected when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.092) to the normalized speed of DataNucleus with HSQLDB embedded database (4.7) reveals that in that case, DataNucleus with HSQLDB embedded is 51.1 times faster than Hibernate with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons