Compare with

Comparison of Hibernate with SQLite embedded vs DataNucleus with DB4O 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
DB4O embedded
Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Basic Person Test0.0830.0591.01.30.550.69
Element Collection Test0.0670.0450.691.00.380.52
Inheritance Test0.0800.0510.990.850.540.45
Indexing Test0.0980.0801.02.30.551.2
Graph (Binary Tree) Test0.27failed0.96failed0.61failed
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.120.0590.931.40.530.71

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

The results above show that in general DataNucleus with DB4O embedded is more efficient than Hibernate with SQLite embedded in persisting JPA entity objects to the database.

A large performance gap has been detected when using database indexes with large transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (1.0) to the normalized speed of DataNucleus with DB4O embedded database (2.3) reveals that in that case, DataNucleus with DB4O embedded is 2.3 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
DB4O embedded
Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Basic Person Test1.80.00471.31.81.50.90
Element Collection Test0.00080.0038failed1.50.00080.77
Inheritance Test2.40.00351.42.21.91.1
Indexing Test1.90.00432.31.82.10.89
Graph (Binary Tree) Test0.56failed0.88failed0.72failed
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests1.30.00411.51.81.40.91

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

The results above show that in general Hibernate with SQLite embedded is more efficient than DataNucleus with DB4O embedded in retrieving JPA entity objects from the database.

A huge performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.0035) to the normalized speed of Hibernate with SQLite embedded database (2.4) reveals that in that case, Hibernate with SQLite embedded is 686 times faster than DataNucleus with DB4O embedded.

On the other hand, Hibernate with SQLite embedded is slower, for instance, 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 DB4O embedded database (0.0038) reveals that in that case, Hibernate with SQLite embedded is 4.8 times slower than DataNucleus with DB4O embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Basic Person Test1.1failed0.22failed0.65failed
Element Collection Test0.39failedfailedfailed0.39failed
Inheritance Test0.53failed0.28failed0.40failed
Indexing Test0.0011failed0.43failed0.21failed
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.50failed0.31failed0.42failed

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Basic Person Test0.0760.0120.650.760.370.39
Element Collection Test0.00220.012failed1.10.00220.53
Inheritance Test0.0790.0110.970.810.530.41
Indexing Test0.0570.0110.541.30.300.64
Graph (Binary Tree) Test0.26failed0.42failed0.34failed
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.0940.0120.650.970.340.49

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

The results above show that in general DataNucleus with DB4O embedded is more efficient than Hibernate with SQLite embedded in updating JPA entity objects in the database.

A large 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 DB4O embedded database (0.012) reveals that in that case, DataNucleus with DB4O embedded is 5.5 times faster than Hibernate with SQLite embedded.

On the other hand, DataNucleus with DB4O embedded is slower, for instance, when using class inheritance in the object model with small transaction size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.011) to the normalized speed of Hibernate with SQLite embedded database (0.079) reveals that in that case, DataNucleus with DB4O embedded is 7.2 times slower 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
DB4O embedded
Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Basic Person Test0.0610.0110.911.50.490.74
Element Collection Test0.00070.010failed1.60.00070.80
Inheritance Test0.0580.00930.901.10.480.57
Indexing Test0.0790.0170.542.10.311.1
Graph (Binary Tree) Test0.24failed0.80failed0.52failed
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.0880.0120.791.60.400.79

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

The results above show that in general DataNucleus with DB4O embedded is more efficient than Hibernate with SQLite embedded in deleting JPA entity objects from the database.

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 DB4O embedded database (0.010) reveals that in that case, DataNucleus with DB4O embedded is 14.3 times faster than Hibernate with SQLite embedded.

On the other hand, DataNucleus with DB4O embedded is slower, for instance, when using class inheritance in the object model with small transaction size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.0093) to the normalized speed of Hibernate with SQLite embedded database (0.058) reveals that in that case, DataNucleus with DB4O embedded is 6.2 times slower 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
DB4O embedded
Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Basic Person Test90.235.190.235.490.235.2
Element Collection Test82.029.582.029.982.029.7
Inheritance Test80.533.480.533.580.533.4
Indexing Test93.441.094.841.994.141.5
Graph (Binary Tree) Test67.9failed50.9failed59.4failed
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests82.834.879.735.281.235.0

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

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

A large gap has been detected when using JPA element collections with small transaction size. Comparing the normalized score of DataNucleus with DB4O embedded database (29.5) to the normalized score of Hibernate with SQLite embedded database (82.0) reveals that in that case, Hibernate with SQLite embedded is 2.8 times more efficient than DataNucleus with DB4O embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Hibernate
SQLite embedded
DataNucleus
DB4O embedded
Basic Person Test0.630.0220.811.30.720.68
Element Collection Test0.0920.0180.691.30.190.66
Inheritance Test0.630.0190.911.20.770.63
Indexing Test0.420.0280.961.90.690.94
Graph (Binary Tree) Test0.33failed0.77failed0.55failed
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.420.0220.861.40.620.73

The results above show that in general DataNucleus with DB4O embedded is slightly more efficient than Hibernate with SQLite embedded in performing JPA database operations.

On the other hand, DataNucleus with DB4O embedded is slower, for instance, when using class inheritance in the object model with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.019) to the normalized speed of Hibernate with SQLite embedded database (0.63) reveals that in that case, DataNucleus with DB4O embedded is 33.2 times slower than Hibernate with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons