Compare with

Comparison of DataNucleus with Derby embedded vs DataNucleus with H2 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 embedded
DataNucleus
H2 embedded
DataNucleus
Derby embedded
DataNucleus
H2 embedded
DataNucleus
Derby embedded
DataNucleus
H2 embedded
Basic Person Test4.619.22.88.03.713.6
Element Collection Test2.46.61.62.82.04.7
Inheritance Test4.615.62.74.43.710.0
Indexing Test7.624.44.811.86.218.1
Graph (Binary Tree) Test1.69.21.46.21.57.7
Multithreading Test8.634.93.37.15.921.0
All Tests4.918.32.86.73.812.5

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

A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of DataNucleus with Derby embedded database (1.6) to the normalized speed of DataNucleus with H2 embedded database (9.2) reveals that in that case, DataNucleus with H2 embedded is 5.7 times faster than DataNucleus with Derby embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
DataNucleus
H2 embedded
DataNucleus
Derby embedded
DataNucleus
H2 embedded
DataNucleus
Derby embedded
DataNucleus
H2 embedded
Basic Person Test6.813.214.913.510.913.3
Element Collection Test5.46.47.68.96.57.7
Inheritance Test8.812.214.812.711.812.4
Indexing Test9.28.114.116.511.612.3
Graph (Binary Tree) Test9.910.615.820.912.915.8
Multithreading Test11.913.311.59.911.711.6
All Tests8.710.613.113.710.912.2

The results above show that in general DataNucleus with H2 embedded is slightly more efficient than DataNucleus with Derby embedded in retrieving JPA entity objects from the database.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
DataNucleus
H2 embedded
DataNucleus
Derby embedded
DataNucleus
H2 embedded
DataNucleus
Derby embedded
DataNucleus
H2 embedded
Basic Person Test39.14.77.51.423.33.1
Element Collection Test46.05.06.72.426.33.7
Inheritance Test7.73.83.81.65.72.7
Indexing Test0.0530.00418.01.84.00.91
Multithreading Testfailed1.2failed0.79failed1.0
All Tests23.23.06.51.614.82.3

DataNucleus with Derby embedded has failed in 2 tests (see exceptions).

The results above show that in general DataNucleus with Derby embedded is much more efficient than DataNucleus with H2 embedded in executing the tested JPA queries. Comparing the normalized speed of DataNucleus with H2 embedded database (2.3) to the normalized speed of DataNucleus with Derby embedded database (14.8) reveals that in these tests, DataNucleus with Derby embedded is 6.4 times faster than DataNucleus with H2 embedded.

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with H2 embedded database (0.0041) to the normalized speed of DataNucleus with Derby embedded database (0.053) reveals that in that case, DataNucleus with Derby embedded is 12.9 times faster than DataNucleus with H2 embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
DataNucleus
H2 embedded
DataNucleus
Derby embedded
DataNucleus
H2 embedded
DataNucleus
Derby embedded
DataNucleus
H2 embedded
Basic Person Test4.010.03.83.93.96.9
Element Collection Test3.77.64.53.94.15.8
Inheritance Test4.49.44.84.44.66.9
Indexing Test5.210.64.25.94.78.2
Graph (Binary Tree) Test2.75.91.53.72.14.8
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests4.08.73.74.43.96.5

DataNucleus with Derby embedded has failed in 2 tests (see exceptions). DataNucleus with H2 embedded has failed in 2 tests (see exceptions).

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

A large performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with Derby embedded database (4.0) to the normalized speed of DataNucleus with H2 embedded database (10.0) reveals that in that case, DataNucleus with H2 embedded is 2.5 times faster than DataNucleus with Derby embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
DataNucleus
H2 embedded
DataNucleus
Derby embedded
DataNucleus
H2 embedded
DataNucleus
Derby embedded
DataNucleus
H2 embedded
Basic Person Test3.54.21.31.32.42.8
Element Collection Test1.94.91.61.61.73.2
Inheritance Test2.44.01.31.31.92.7
Indexing Test6.67.51.91.94.34.7
Graph (Binary Tree) Test0.815.60.934.10.874.8
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests3.05.21.42.02.23.6

DataNucleus with Derby embedded has failed in 2 tests (see exceptions). DataNucleus with H2 embedded has failed in 2 tests (see exceptions).

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

A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of DataNucleus with Derby embedded database (0.81) to the normalized speed of DataNucleus with H2 embedded database (5.6) reveals that in that case, DataNucleus with H2 embedded is 6.9 times faster than DataNucleus with Derby embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
DataNucleus
H2 embedded
DataNucleus
Derby embedded
DataNucleus
H2 embedded
DataNucleus
Derby embedded
DataNucleus
H2 embedded
Basic Person Test53.327.053.327.053.327.0
Element Collection Test42.622.442.622.442.622.4
Inheritance Test48.127.048.127.048.127.0
Indexing Test62.331.663.332.162.831.9
Graph (Binary Tree) Test13.620.010.215.011.917.5
Multithreading Test52.033.98.09.230.021.5
All Tests45.327.037.622.141.524.6

The results above show that in general DataNucleus with Derby embedded is more efficient than DataNucleus with H2 embedded in using disk space.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
DataNucleus
H2 embedded
DataNucleus
Derby embedded
DataNucleus
H2 embedded
DataNucleus
Derby embedded
DataNucleus
H2 embedded
Basic Person Test11.610.36.15.68.87.9
Element Collection Test11.96.14.43.98.15.0
Inheritance Test5.69.05.54.95.56.9
Indexing Test5.710.16.67.66.28.9
Graph (Binary Tree) Test3.77.84.98.74.38.3
Multithreading Test10.316.57.45.98.811.2
All Tests8.09.65.76.06.97.8

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

A large performance gap has been detected when using graphs of objects with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with Derby embedded database (3.7) to the normalized speed of DataNucleus with H2 embedded database (7.8) reveals that in that case, DataNucleus with H2 embedded is 2.1 times faster than DataNucleus with Derby embedded.

Other Head to Head DBMS/JPA Comparisons