Compare with

Comparison of Hibernate with PostgreSQL server 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
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Basic Person Test7.10.0593.41.35.20.69
Element Collection Test2.90.0451.71.02.30.52
Inheritance Test7.00.0513.60.855.30.45
Indexing Test9.30.0806.12.37.71.2
Graph (Binary Tree) Test3.0failed2.9failed2.9failed
Multithreading Test31.7failed13.9failed22.8failed
All Tests10.20.0595.31.47.70.71

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

The results above show that in general Hibernate with PostgreSQL server is much more efficient than DataNucleus with DB4O embedded in persisting JPA entity objects to the database. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.71) to the normalized speed of Hibernate with PostgreSQL database server (7.7) reveals that in these tests, Hibernate with PostgreSQL server is 10.8 times faster than DataNucleus with DB4O embedded.

A huge performance gap has been detected when using class inheritance in the object model with small transaction size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.051) to the normalized speed of Hibernate with PostgreSQL database server (7.0) reveals that in that case, Hibernate with PostgreSQL server is 137 times faster than DataNucleus with DB4O embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Basic Person Test5.50.004711.51.88.50.90
Element Collection Test0.0250.00380.0171.50.0210.77
Inheritance Test5.20.003514.02.29.61.1
Indexing Test4.60.004313.31.88.90.89
Graph (Binary Tree) Test0.61failed0.78failed0.70failed
Multithreading Test11.3failed17.0failed14.2failed
All Tests4.50.00419.41.87.00.91

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

The results above show that in general Hibernate with PostgreSQL server is much more efficient than DataNucleus with DB4O embedded in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.91) to the normalized speed of Hibernate with PostgreSQL database server (7.0) reveals that in these tests, Hibernate with PostgreSQL server is 7.7 times faster than DataNucleus with DB4O embedded.

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 PostgreSQL database server (5.2) reveals that in that case, Hibernate with PostgreSQL server is 1,486 times faster than DataNucleus with DB4O embedded.

On the other hand, Hibernate with PostgreSQL server is slower, for instance, when using JPA element collections with large retrieval size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.017) to the normalized speed of DataNucleus with DB4O embedded database (1.5) reveals that in that case, Hibernate with PostgreSQL server is 88.2 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
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Basic Person Test55.5failed6.1failed30.8failed
Element Collection Test11.0failed0.016failed5.5failed
Inheritance Test52.3failed8.7failed30.5failed
Indexing Test0.050failed8.8failed4.4failed
Multithreading Test55.2failed9.2failed32.2failed
All Tests34.8failed6.6failed20.7failed

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
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Basic Person Test5.30.0122.70.764.00.39
Element Collection Test0.0670.0120.0261.10.0460.53
Inheritance Test5.40.0113.80.814.60.41
Indexing Test5.40.0114.31.34.80.64
Graph (Binary Tree) Test1.1failed0.58failed0.82failed
Multithreading Test29.6failed6.3failed18.0failed
All Tests7.80.0122.90.975.40.49

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

The results above show that in general Hibernate with PostgreSQL server is much more efficient than DataNucleus with DB4O embedded in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.49) to the normalized speed of Hibernate with PostgreSQL database server (5.4) reveals that in these tests, Hibernate with PostgreSQL server is 11.0 times faster than DataNucleus with DB4O embedded.

A huge performance gap has been detected 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 PostgreSQL database server (5.4) reveals that in that case, Hibernate with PostgreSQL server is 491 times faster than DataNucleus with DB4O embedded.

On the other hand, Hibernate with PostgreSQL server is slower, for instance, when using JPA element collections with large transaction size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.026) to the normalized speed of DataNucleus with DB4O embedded database (1.1) reveals that in that case, Hibernate with PostgreSQL server is 42.3 times slower than DataNucleus with DB4O embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Basic Person Test5.30.0114.21.54.80.74
Element Collection Test0.0200.010stopped1.60.00980.80
Inheritance Test5.10.00934.21.14.60.57
Indexing Test9.50.0176.32.17.91.1
Graph (Binary Tree) Test0.012failed0.012failed0.012failed
Multithreading Test23.3failed21.8failed22.5failed
All Tests7.20.0126.11.66.60.79

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

The results above show that in general Hibernate with PostgreSQL server is much more efficient than DataNucleus with DB4O embedded in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.79) to the normalized speed of Hibernate with PostgreSQL database server (6.6) reveals that in these tests, Hibernate with PostgreSQL server is 8.4 times faster than DataNucleus with DB4O embedded.

A huge performance gap has been detected when using database indexes with small transaction size. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.017) to the normalized speed of Hibernate with PostgreSQL database server (9.5) reveals that in that case, Hibernate with PostgreSQL server is 559 times faster than DataNucleus with DB4O embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Basic Person Test15.70.0225.61.310.70.68
Element Collection Test2.80.0180.351.31.60.66
Inheritance Test15.00.0196.91.210.90.63
Indexing Test5.80.0287.81.96.80.94
Graph (Binary Tree) Test1.2failed1.1failed1.1failed
Multithreading Test30.2failed13.6failed21.9failed
All Tests12.10.0226.01.49.10.73

The results above show that in general Hibernate with PostgreSQL server is much more efficient than DataNucleus with DB4O embedded in performing JPA database operations. Comparing the normalized speed of DataNucleus with DB4O embedded database (0.73) to the normalized speed of Hibernate with PostgreSQL database server (9.1) reveals that in these tests, Hibernate with PostgreSQL server is 12.5 times faster than DataNucleus with DB4O embedded.

A huge performance gap has been detected 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 PostgreSQL database server (15.0) reveals that in that case, Hibernate with PostgreSQL server is 789 times faster than DataNucleus with DB4O embedded.

On the other hand, Hibernate with PostgreSQL server is slower, for instance, when using JPA element collections with large transaction/retrieval size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.35) to the normalized speed of DataNucleus with DB4O embedded database (1.3) reveals that in that case, Hibernate with PostgreSQL server is 3.7 times slower than DataNucleus with DB4O embedded.

Other Head to Head DBMS/JPA Comparisons