Compare with

Comparison of DataNucleus with Derby server vs Hibernate 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
 DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
Basic Person Test2.80.0832.31.02.60.55
Element Collection Test0.710.0670.350.690.530.38
Inheritance Test2.70.0802.00.992.30.54
Indexing Test4.50.0984.01.04.30.55
Graph (Binary Tree) Test0.620.270.530.960.570.61
Multithreading Test4.9failed3.4failed4.1failed
All Tests2.70.122.10.932.40.53

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
 DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
Basic Person Test0.561.86.31.33.41.5
Element Collection Test0.360.00080.93failed0.640.0008
Inheritance Test0.452.46.81.43.61.9
Indexing Test0.501.97.12.33.82.1
Graph (Binary Tree) Test0.220.566.60.883.40.72
Multithreading Test1.2failed10.0failed5.6failed
All Tests0.551.36.31.53.41.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
 DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
Basic Person Test37.71.13.60.2220.70.65
Element Collection Test25.90.391.4failed13.60.39
Inheritance Test6.50.531.80.284.20.40
Indexing Test0.0300.00114.90.432.50.21
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests17.50.502.90.3110.20.42

DataNucleus with Derby server has failed in 2 tests (see exceptions). Hibernate with SQLite embedded has failed in 3 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
 DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
Basic Person Test1.10.0760.850.650.990.37
Element Collection Test0.810.00220.62failed0.710.0022
Inheritance Test1.20.0791.30.971.20.53
Indexing Test1.20.0571.50.541.30.30
Graph (Binary Tree) Test0.290.260.410.420.350.34
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.930.0940.920.650.920.34

DataNucleus with Derby server has failed in 2 tests (see exceptions). 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 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
 DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
Basic Person Test1.30.0611.30.911.30.49
Element Collection Test0.610.00070.33failed0.470.0007
Inheritance Test1.00.0581.30.901.20.48
Indexing Test2.30.0791.90.542.10.31
Graph (Binary Tree) Test0.260.240.460.800.360.52
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests1.10.0881.10.791.10.40

DataNucleus with Derby server has failed in 2 tests (see exceptions). 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 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
 DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
DataNucleus
Derby server
Hibernate
SQLite embedded
Basic Person Test8.70.632.90.815.80.72
Element Collection Test5.70.0920.720.693.20.19
Inheritance Test2.40.632.60.912.50.77
Indexing Test1.70.423.90.962.80.69
Graph (Binary Tree) Test0.350.332.00.771.20.55
Multithreading Test3.0failed6.7failed4.9failed
All Tests3.80.422.80.863.30.62

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