Compare with

Comparison of Hibernate with SQLite embedded vs DataNucleus with Derby 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
 Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Basic Person Test0.0832.81.02.30.552.6
Element Collection Test0.0670.710.690.350.380.53
Inheritance Test0.0802.70.992.00.542.3
Indexing Test0.0984.51.04.00.554.3
Graph (Binary Tree) Test0.270.620.960.530.610.57
Multithreading Testfailed4.9failed3.4failed4.1
All Tests0.122.70.932.10.532.4

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

The results above show that in general DataNucleus with Derby server 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 Derby database server (2.4) reveals that in these tests, DataNucleus with Derby server is 4.5 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 Derby database server (4.5) reveals that in that case, DataNucleus with Derby server is 45.9 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
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Basic Person Test1.80.561.36.31.53.4
Element Collection Test0.00080.36failed0.930.00080.64
Inheritance Test2.40.451.46.81.93.6
Indexing Test1.90.502.37.12.13.8
Graph (Binary Tree) Test0.560.220.886.60.723.4
Multithreading Testfailed1.2failed10.0failed5.6
All Tests1.30.551.56.31.43.4

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

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

On the other hand, DataNucleus with Derby server is slower, for instance, when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.45) to the normalized speed of Hibernate with SQLite embedded database (2.4) reveals that in that case, DataNucleus with Derby server is 5.3 times slower 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
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Basic Person Test1.137.70.223.60.6520.7
Element Collection Test0.3925.9failed1.40.3913.6
Inheritance Test0.536.50.281.80.404.2
Indexing Test0.00110.0300.434.90.212.5
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.5017.50.312.90.4210.2

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

The results above show that in general DataNucleus with Derby server is much more efficient than Hibernate with SQLite embedded in executing the tested JPA queries. Comparing the normalized speed of Hibernate with SQLite embedded database (0.42) to the normalized speed of DataNucleus with Derby database server (10.2) reveals that in these tests, DataNucleus with Derby server is 24.3 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.39) to the normalized speed of DataNucleus with Derby database server (25.9) reveals that in that case, DataNucleus with Derby server is 66.4 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
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Basic Person Test0.0761.10.650.850.370.99
Element Collection Test0.00220.81failed0.620.00220.71
Inheritance Test0.0791.20.971.30.531.2
Indexing Test0.0571.20.541.50.301.3
Graph (Binary Tree) Test0.260.290.420.410.340.35
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.0940.930.650.920.340.92

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

The results above show that in general DataNucleus with Derby server is 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 Derby database server (0.92) reveals that in these tests, DataNucleus with Derby server is 2.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.0022) to the normalized speed of DataNucleus with Derby database server (0.81) reveals that in that case, DataNucleus with Derby server is 368 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
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Basic Person Test0.0611.30.911.30.491.3
Element Collection Test0.00070.61failed0.330.00070.47
Inheritance Test0.0581.00.901.30.481.2
Indexing Test0.0792.30.541.90.312.1
Graph (Binary Tree) Test0.240.260.800.460.520.36
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.0881.10.791.10.401.1

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

The results above show that in general DataNucleus with Derby server is 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 Derby database server (1.1) reveals that in these tests, DataNucleus with Derby server is 2.8 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 Derby database server (0.61) reveals that in that case, DataNucleus with Derby server is 871 times faster than Hibernate with SQLite embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Basic Person Test0.638.70.812.90.725.8
Element Collection Test0.0925.70.690.720.193.2
Inheritance Test0.632.40.912.60.772.5
Indexing Test0.421.70.963.90.692.8
Graph (Binary Tree) Test0.330.350.772.00.551.2
Multithreading Testfailed3.0failed6.7failed4.9
All Tests0.423.80.862.80.623.3

The results above show that in general DataNucleus with Derby server 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 Derby database server (3.3) reveals that in these tests, DataNucleus with Derby server is 5.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 Derby database server (5.7) reveals that in that case, DataNucleus with Derby server is 62.0 times faster than Hibernate with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons