Compare with

Comparison of DataNucleus with H2 embedded vs EclipseLink 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
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
Basic Person Test19.20.0748.00.9013.60.49
Element Collection Test6.60.0612.80.654.70.36
Inheritance Test15.60.0834.40.8210.00.45
Indexing Test24.40.1111.81.618.10.87
Graph (Binary Tree) Test9.20.246.20.917.70.57
Multithreading Test34.90.107.12.121.01.1
All Tests18.30.116.71.212.50.64

The results above show that in general DataNucleus with H2 embedded is much more efficient than EclipseLink with SQLite embedded in persisting JPA entity objects to the database. Comparing the normalized speed of EclipseLink with SQLite embedded database (0.64) to the normalized speed of DataNucleus with H2 embedded database (12.5) reveals that in these tests, DataNucleus with H2 embedded is 19.5 times faster than EclipseLink with SQLite embedded.

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with SQLite embedded database (0.10) to the normalized speed of DataNucleus with H2 embedded database (34.9) reveals that in that case, DataNucleus with H2 embedded is 349 times faster than EclipseLink with SQLite embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
Basic Person Test13.2failed13.5failed13.3failed
Element Collection Test6.40.00078.9failed7.70.0007
Inheritance Test12.2failed12.7failed12.4failed
Indexing Test8.1failed16.5failed12.3failed
Graph (Binary Tree) Test10.6failed20.9failed15.8failed
Multithreading Test13.3failed9.9failed11.6failed
All Tests10.60.000713.7failed12.20.0007

EclipseLink with SQLite embedded has failed in 11 tests (see exceptions).

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
Basic Person Test4.71.21.4failed3.11.2
Element Collection Test5.00.292.4failed3.70.29
Inheritance Test3.80.691.6failed2.70.69
Indexing Test0.00410.00081.8failed0.910.0008
Multithreading Test1.2failed0.79failed1.0failed
All Tests3.00.551.6failed2.30.55

EclipseLink with SQLite embedded has failed in 6 tests (see exceptions).

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
Basic Person Test10.0failed3.9failed6.9failed
Element Collection Test7.60.00163.9failed5.80.0016
Inheritance Test9.4failed4.4failed6.9failed
Indexing Test10.6failed5.9failed8.2failed
Graph (Binary Tree) Test5.9failed3.7failed4.8failed
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests8.70.00164.4failed6.50.0016

DataNucleus with H2 embedded has failed in 2 tests (see exceptions). EclipseLink with SQLite embedded has failed in 11 tests (see exceptions).

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
Basic Person Test4.2failed1.3failed2.8failed
Element Collection Test4.90.00061.6failed3.20.0006
Inheritance Test4.0failed1.3failed2.7failed
Indexing Test7.5failed1.9failed4.7failed
Graph (Binary Tree) Test5.6failed4.1failed4.8failed
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests5.20.00062.0failed3.60.0006

DataNucleus with H2 embedded has failed in 2 tests (see exceptions). EclipseLink with SQLite embedded has failed in 11 tests (see exceptions).

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
Basic Person Test27.079.427.079.427.079.4
Element Collection Test22.474.522.474.522.474.5
Inheritance Test27.075.027.075.027.075.0
Indexing Test31.692.932.194.531.993.7
Graph (Binary Tree) Test20.060.615.048.417.554.5
Multithreading Test33.91009.210021.5100
All Tests27.080.422.178.624.679.5

The results above show that in general EclipseLink with SQLite embedded is much more efficient than DataNucleus with H2 embedded in using disk space. Comparing the normalized score of DataNucleus with H2 embedded database (24.6) to the normalized score of EclipseLink with SQLite embedded database (79.5) reveals that in these tests, EclipseLink with SQLite embedded is 3.2 times more efficient than DataNucleus with H2 embedded.

A huge gap has been detected when using multithreading with large transaction size. Comparing the normalized score of DataNucleus with H2 embedded database (9.2) to the normalized score of EclipseLink with SQLite embedded database (100) reveals that in that case, EclipseLink with SQLite embedded is 10.9 times more efficient than DataNucleus with H2 embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
Basic Person Test10.30.665.60.907.90.74
Element Collection Test6.10.0703.90.655.00.17
Inheritance Test9.00.384.90.826.90.53
Indexing Test10.10.0587.61.68.90.58
Graph (Binary Tree) Test7.80.248.70.918.30.57
Multithreading Test16.50.105.92.111.21.1
All Tests9.60.226.01.27.80.52

The results above show that in general DataNucleus with H2 embedded is much more efficient than EclipseLink with SQLite embedded in performing JPA database operations. Comparing the normalized speed of EclipseLink with SQLite embedded database (0.52) to the normalized speed of DataNucleus with H2 embedded database (7.8) reveals that in these tests, DataNucleus with H2 embedded is 15.0 times faster than EclipseLink with SQLite embedded.

A huge performance gap has been detected when using database indexes with small transaction/retrieval size. Comparing the normalized speed of EclipseLink with SQLite embedded database (0.058) to the normalized speed of DataNucleus with H2 embedded database (10.1) reveals that in that case, DataNucleus with H2 embedded is 174 times faster than EclipseLink with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons