Compare with

Comparison of DataNucleus with DB4O embedded vs Hibernate with PostgreSQL server

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
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
Basic Person Test0.0597.11.33.40.695.2
Element Collection Test0.0452.91.01.70.522.3
Inheritance Test0.0517.00.853.60.455.3
Indexing Test0.0809.32.36.11.27.7
Graph (Binary Tree) Testfailed3.0failed2.9failed2.9
Multithreading Testfailed31.7failed13.9failed22.8
All Tests0.05910.21.45.30.717.7

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
 DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
Basic Person Test0.00475.51.811.50.908.5
Element Collection Test0.00380.0251.50.0170.770.021
Inheritance Test0.00355.22.214.01.19.6
Indexing Test0.00434.61.813.30.898.9
Graph (Binary Tree) Testfailed0.61failed0.78failed0.70
Multithreading Testfailed11.3failed17.0failed14.2
All Tests0.00414.51.89.40.917.0

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
 DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
Basic Person Testfailed55.5failed6.1failed30.8
Element Collection Testfailed11.0failed0.016failed5.5
Inheritance Testfailed52.3failed8.7failed30.5
Indexing Testfailed0.050failed8.8failed4.4
Multithreading Testfailed55.2failed9.2failed32.2
All Testsfailed34.8failed6.6failed20.7

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
 DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
Basic Person Test0.0125.30.762.70.394.0
Element Collection Test0.0120.0671.10.0260.530.046
Inheritance Test0.0115.40.813.80.414.6
Indexing Test0.0115.41.34.30.644.8
Graph (Binary Tree) Testfailed1.1failed0.58failed0.82
Multithreading Testfailed29.6failed6.3failed18.0
All Tests0.0127.80.972.90.495.4

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
 DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
Basic Person Test0.0115.31.54.20.744.8
Element Collection Test0.0100.0201.6stopped0.800.0098
Inheritance Test0.00935.11.14.20.574.6
Indexing Test0.0179.52.16.31.17.9
Graph (Binary Tree) Testfailed0.012failed0.012failed0.012
Multithreading Testfailed23.3failed21.8failed22.5
All Tests0.0127.21.66.10.796.6

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
 DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
DataNucleus
DB4O embedded
Hibernate
PostgreSQL server
Basic Person Test0.02215.71.35.60.6810.7
Element Collection Test0.0182.81.30.350.661.6
Inheritance Test0.01915.01.26.90.6310.9
Indexing Test0.0285.81.97.80.946.8
Graph (Binary Tree) Testfailed1.2failed1.1failed1.1
Multithreading Testfailed30.2failed13.6failed21.9
All Tests0.02212.11.46.00.739.1

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