Compare with

Comparison of DataNucleus with SQLite embedded vs Hibernate with MySQL 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
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
Basic Person Test 1.5 6.9 4.2
Element Collection Test 1.8 4.4 3.1
Inheritance Test 1.0 5.7 3.4
Indexing Test 1.7 8.3 5.0
Graph (Binary Tree) Test 3.4 4.3 3.9
Multithreading Test 2.6 0.0000 1.3
All Tests 2.0 4.9 3.5

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
Basic Person Test0.431.7 9.30.435.5
Element Collection Test 0.57 0.59 0.58
Inheritance Test 1.7 6.5 4.1
Indexing Test 1.7 10.0 5.9
Graph (Binary Tree) Test 0.21 0.38 0.30
Multithreading Test 3.0 5.1 4.1
All Tests0.431.5 5.30.433.4

The results above show that in general Hibernate with MySQL server is much more efficient than DataNucleus with SQLite embedded in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.43) to the normalized speed of Hibernate with MySQL database server (3.4) reveals that in these tests, Hibernate with MySQL server is 7.9 times faster than DataNucleus with SQLite embedded.

A large performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.43) to the normalized speed of Hibernate with MySQL database server (1.7) reveals that in that case, Hibernate with MySQL server is 4.0 times faster than DataNucleus with SQLite embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
Basic Person Testfailed0.17 1.1failed0.62
Element Collection Test 0.39 0.54 0.47
Inheritance Test 0.17 1.2 0.70
Indexing Test 1.0 3.0 2.0
Multithreading Test 1.0 2.1 1.5
All Testsfailed0.56 1.6failed1.1

DataNucleus with SQLite embedded has failed in 1 tests (see exceptions).

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
Basic Person Test0.0250.21 0.770.0250.49
Element Collection Test 0.31 0.70 0.51
Inheritance Test 0.19 0.92 0.56
Indexing Test 0.63 1.2 0.92
Graph (Binary Tree) Test 0.30 0.24 0.27
Multithreading Test 0.23 1.4 0.81
All Tests0.0250.31 0.870.0250.59

The results above show that in general Hibernate with MySQL server is much more efficient than DataNucleus with SQLite embedded in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.025) to the normalized speed of Hibernate with MySQL database server (0.59) reveals that in these tests, Hibernate with MySQL server is 23.6 times faster than DataNucleus with SQLite embedded.

A large performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.025) to the normalized speed of Hibernate with MySQL database server (0.21) reveals that in that case, Hibernate with MySQL server is 8.4 times faster than DataNucleus with SQLite embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
Basic Person Test0.171.1 6.00.173.5
Element Collection Test 1.0 0.68 0.84
Inheritance Test 1.2 3.2 2.2
Indexing Test 1.7 3.4 2.6
Graph (Binary Tree) Test 4.0 7.4 5.7
Multithreading Test 1.1 0.0000 0.54
All Tests0.171.7 3.40.172.6

The results above show that in general Hibernate with MySQL server is much more efficient than DataNucleus with SQLite embedded in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.17) to the normalized speed of Hibernate with MySQL database server (2.6) reveals that in these tests, Hibernate with MySQL server is 15.3 times faster than DataNucleus with SQLite embedded.

A large performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.17) to the normalized speed of Hibernate with MySQL database server (1.1) reveals that in that case, Hibernate with MySQL server is 6.5 times faster than DataNucleus with SQLite embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
Basic Person Test0.210.93 4.80.212.9
Element Collection Test 0.82 1.4 1.1
Inheritance Test 0.87 3.5 2.2
Indexing Test 1.3 5.2 3.3
Graph (Binary Tree) Test 2.0 3.1 2.5
Multithreading Test 1.6 1.7 1.7
All Tests0.211.2 3.30.212.3

The results above show that in general Hibernate with MySQL server is much more efficient than DataNucleus with SQLite embedded in performing JPA database operations. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.21) to the normalized speed of Hibernate with MySQL database server (2.3) reveals that in these tests, Hibernate with MySQL server is 11.0 times faster than DataNucleus with SQLite embedded.

A large performance gap has been detected when using simple basic entities with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.21) to the normalized speed of Hibernate with MySQL database server (0.93) reveals that in that case, Hibernate with MySQL server is 4.4 times faster than DataNucleus with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons