Comparison of Hibernate with SQLite embedded vs OpenJPA with Derby 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 Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded |
Basic Person Test | 0.083 | 4.8 | 1.0 | 2.9 | 0.55 | 3.9 |
Element Collection Test | 0.067 | 2.8 | 0.69 | 1.9 | 0.38 | 2.4 |
Inheritance Test | 0.080 | 4.1 | 0.99 | 2.4 | 0.54 | 3.3 |
Indexing Test | 0.098 | 6.1 | 1.0 | 4.1 | 0.55 | 5.1 |
Graph (Binary Tree) Test | 0.27 | 1.5 | 0.96 | 1.4 | 0.61 | 1.4 |
Multithreading Test | failed | 8.7 | failed | 3.3 | failed | 6.0 |
All Tests | 0.12 | 4.7 | 0.93 | 2.7 | 0.53 | 3.7 |
Hibernate with SQLite embedded has failed in 2 tests (see exceptions).
The results above show that in general OpenJPA with Derby embedded is much more efficient than Hibernate with SQLite embedded in persisting JPA entity objects to the database. Comparing the normalized speed of Hibernate with SQLite embedded database (0.53) to the normalized speed of OpenJPA with Derby embedded database (3.7) reveals that in these tests, OpenJPA with Derby embedded is 7.0 times faster than Hibernate with SQLite embedded.
A huge performance gap has been detected when using database indexes with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.098) to the normalized speed of OpenJPA with Derby embedded database (6.1) reveals that in that case, OpenJPA with Derby embedded is 62.2 times faster than Hibernate with SQLite embedded.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded |
Basic Person Test | 1.8 | 14.8 | 1.3 | 22.6 | 1.5 | 18.7 |
Element Collection Test | 0.0008 | 0.0031 | failed | 2.3 | 0.0008 | 1.2 |
Inheritance Test | 2.4 | 0.015 | 1.4 | 7.0 | 1.9 | 3.5 |
Indexing Test | 1.9 | 11.7 | 2.3 | 26.5 | 2.1 | 19.1 |
Graph (Binary Tree) Test | 0.56 | 0.93 | 0.88 | 1.2 | 0.72 | 1.1 |
Multithreading Test | failed | 25.2 | failed | 28.6 | failed | 26.9 |
All Tests | 1.3 | 8.8 | 1.5 | 14.7 | 1.4 | 11.7 |
Hibernate with SQLite embedded has failed in 3 tests (see exceptions).
The results above show that in general OpenJPA with Derby embedded is much more efficient than Hibernate with SQLite embedded in retrieving JPA entity objects from the database. Comparing the normalized speed of Hibernate with SQLite embedded database (1.4) to the normalized speed of OpenJPA with Derby embedded database (11.7) reveals that in these tests, OpenJPA with Derby embedded is 8.4 times faster than Hibernate with SQLite embedded.
A huge performance gap has been detected when using simple basic entities with large retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (1.3) to the normalized speed of OpenJPA with Derby embedded database (22.6) reveals that in that case, OpenJPA with Derby embedded is 17.4 times faster than Hibernate with SQLite embedded.
On the other hand, OpenJPA with Derby embedded is slower, for instance, when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.015) to the normalized speed of Hibernate with SQLite embedded database (2.4) reveals that in that case, OpenJPA with Derby embedded is 160 times slower than Hibernate with SQLite embedded.
Speed comparison of JPA database query operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded |
Basic Person Test | 1.1 | 49.7 | 0.22 | 9.9 | 0.65 | 29.8 |
Element Collection Test | 0.39 | 2.7 | failed | 9.6 | 0.39 | 6.1 |
Inheritance Test | 0.53 | 2.3 | 0.28 | 1.3 | 0.40 | 1.8 |
Indexing Test | 0.0011 | 7.0 | 0.43 | 17.1 | 0.21 | 12.1 |
Multithreading Test | failed | 40.9 | failed | 11.7 | failed | 26.3 |
All Tests | 0.50 | 20.5 | 0.31 | 9.9 | 0.42 | 15.2 |
Hibernate with SQLite embedded has failed in 3 tests (see exceptions).
The results above show that in general OpenJPA with Derby embedded is much more efficient than Hibernate with SQLite embedded in executing the tested JPA queries. Comparing the normalized speed of Hibernate with SQLite embedded database (0.42) to the normalized speed of OpenJPA with Derby embedded database (15.2) reveals that in these tests, OpenJPA with Derby embedded is 36.2 times faster than Hibernate with SQLite embedded.
A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0011) to the normalized speed of OpenJPA with Derby embedded database (7.0) reveals that in that case, OpenJPA with Derby embedded is 6,364 times faster than Hibernate with SQLite embedded.
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded |
Basic Person Test | 0.076 | 5.6 | 0.65 | 5.2 | 0.37 | 5.4 |
Element Collection Test | 0.0022 | 0.0090 | failed | 2.2 | 0.0022 | 1.1 |
Inheritance Test | 0.079 | 0.045 | 0.97 | 4.6 | 0.53 | 2.3 |
Indexing Test | 0.057 | 6.1 | 0.54 | 8.7 | 0.30 | 7.4 |
Graph (Binary Tree) Test | 0.26 | 1.6 | 0.42 | 0.91 | 0.34 | 1.3 |
Multithreading Test | failed | 18.3 | failed | 4.5 | failed | 11.4 |
All Tests | 0.094 | 5.3 | 0.65 | 4.4 | 0.34 | 4.8 |
Hibernate with SQLite embedded has failed in 3 tests (see exceptions).
The results above show that in general OpenJPA with Derby embedded is much more efficient than Hibernate with SQLite embedded in updating JPA entity objects in the database. Comparing the normalized speed of Hibernate with SQLite embedded database (0.34) to the normalized speed of OpenJPA with Derby embedded database (4.8) reveals that in these tests, OpenJPA with Derby embedded is 14.1 times faster than Hibernate with SQLite embedded.
A huge performance gap has been detected when using database indexes with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.057) to the normalized speed of OpenJPA with Derby embedded database (6.1) reveals that in that case, OpenJPA with Derby embedded is 107 times faster than Hibernate with SQLite embedded.
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded |
Basic Person Test | 0.061 | 4.2 | 0.91 | 4.5 | 0.49 | 4.3 |
Element Collection Test | 0.0007 | 0.0071 | failed | 1.6 | 0.0007 | 0.80 |
Inheritance Test | 0.058 | 0.035 | 0.90 | 3.0 | 0.48 | 1.5 |
Indexing Test | 0.079 | 5.3 | 0.54 | 3.6 | 0.31 | 4.4 |
Graph (Binary Tree) Test | 0.24 | 0.80 | 0.80 | 0.93 | 0.52 | 0.86 |
Multithreading Test | failed | 5.7 | failed | 6.2 | failed | 6.0 |
All Tests | 0.088 | 2.7 | 0.79 | 3.3 | 0.40 | 3.0 |
Hibernate with SQLite embedded has failed in 3 tests (see exceptions).
The results above show that in general OpenJPA with Derby embedded is much more efficient than Hibernate with SQLite embedded in deleting JPA entity objects from the database. Comparing the normalized speed of Hibernate with SQLite embedded database (0.40) to the normalized speed of OpenJPA with Derby embedded database (3.0) reveals that in these tests, OpenJPA with Derby embedded is 7.5 times faster than Hibernate with SQLite embedded.
A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.061) to the normalized speed of OpenJPA with Derby embedded database (4.2) reveals that in that case, OpenJPA with Derby embedded is 68.9 times faster than Hibernate with SQLite embedded.
Comparison of database storage efficiency (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded |
Basic Person Test | 90.2 | 52.8 | 90.2 | 52.8 | 90.2 | 52.8 |
Element Collection Test | 82.0 | 42.4 | 82.0 | 42.4 | 82.0 | 42.4 |
Inheritance Test | 80.5 | 44.2 | 80.5 | 44.2 | 80.5 | 44.2 |
Indexing Test | 93.4 | 53.1 | 94.8 | 54.0 | 94.1 | 53.5 |
Graph (Binary Tree) Test | 67.9 | 12.8 | 50.9 | 9.6 | 59.4 | 11.2 |
Multithreading Test | failed | 50.7 | failed | 9.7 | failed | 30.2 |
All Tests | 82.8 | 42.7 | 79.7 | 35.5 | 81.2 | 39.1 |
Hibernate with SQLite embedded has failed in 2 tests (see exceptions).
The results above show that in general Hibernate with SQLite embedded is more efficient than OpenJPA with Derby embedded in using disk space. Comparing the normalized score of OpenJPA with Derby embedded database (39.1) to the normalized score of Hibernate with SQLite embedded database (81.2) reveals that in these tests, Hibernate with SQLite embedded is 2.1 times more efficient than OpenJPA with Derby embedded.
A large gap has been detected when using graphs of objects with small transaction size. Comparing the normalized score of OpenJPA with Derby embedded database (12.8) to the normalized score of Hibernate with SQLite embedded database (67.9) reveals that in that case, Hibernate with SQLite embedded is 5.3 times more efficient than OpenJPA with Derby embedded.
Comparison of JPA/Database speed - the averages (normalized score, higher is better)
Transaction/Retrieval Size | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded |
Basic Person Test | 0.63 | 15.8 | 0.81 | 9.0 | 0.72 | 12.4 |
Element Collection Test | 0.092 | 1.1 | 0.69 | 3.5 | 0.19 | 2.3 |
Inheritance Test | 0.63 | 1.3 | 0.91 | 3.7 | 0.77 | 2.5 |
Indexing Test | 0.42 | 7.2 | 0.96 | 12.0 | 0.69 | 9.6 |
Graph (Binary Tree) Test | 0.33 | 1.2 | 0.77 | 1.1 | 0.55 | 1.2 |
Multithreading Test | failed | 19.8 | failed | 10.9 | failed | 15.3 |
All Tests | 0.42 | 8.0 | 0.86 | 6.9 | 0.62 | 7.4 |
The results above show that in general OpenJPA with Derby embedded is much more efficient than Hibernate with SQLite embedded in performing JPA database operations. Comparing the normalized speed of Hibernate with SQLite embedded database (0.62) to the normalized speed of OpenJPA with Derby embedded database (7.4) reveals that in these tests, OpenJPA with Derby embedded is 11.9 times faster than Hibernate with SQLite embedded.
A huge performance gap has been detected when using simple basic entities with small transaction/retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.63) to the normalized speed of OpenJPA with Derby embedded database (15.8) reveals that in that case, OpenJPA with Derby embedded is 25.1 times faster than Hibernate with SQLite embedded.
Other Head to Head DBMS/JPA Comparisons
Hibernate with SQLite embedded against:
- Oracle Database 11g
- IBM DB2 10
- Microsoft SQL Server 2008
- DataNucleus with Derby embedded
- DataNucleus with H2 embedded
- DataNucleus with HSQLDB embedded
- DataNucleus with DB4O embedded
- DataNucleus with Derby server
- DataNucleus with H2 server
- DataNucleus with MySQL server
- DataNucleus with PostgreSQL server
- EclipseLink with Derby embedded
- EclipseLink with H2 embedded
- EclipseLink with HSQLDB embedded
- EclipseLink with SQLite embedded
- EclipseLink with Derby server
- EclipseLink with H2 server
- EclipseLink with MySQL server
- EclipseLink with PostgreSQL server
- Hibernate with Derby embedded
- Hibernate with H2 embedded
- Hibernate with HSQLDB embedded
- Hibernate with Derby server
- Hibernate with H2 server
- Hibernate with MySQL server
- Hibernate with PostgreSQL server
- OpenJPA with Derby embedded
- OpenJPA with H2 embedded
- OpenJPA with HSQLDB embedded
- OpenJPA with Derby server
- OpenJPA with H2 server
- OpenJPA with MySQL server
- OpenJPA with PostgreSQL server
- ObjectDB embedded
- ObjectDB server
OpenJPA with Derby embedded against:
- Oracle Database 11g
- IBM DB2 10
- Microsoft SQL Server 2008
- DataNucleus with Derby embedded
- DataNucleus with H2 embedded
- DataNucleus with HSQLDB embedded
- DataNucleus with DB4O embedded
- DataNucleus with Derby server
- DataNucleus with H2 server
- DataNucleus with MySQL server
- DataNucleus with PostgreSQL server
- EclipseLink with Derby embedded
- EclipseLink with H2 embedded
- EclipseLink with HSQLDB embedded
- EclipseLink with SQLite embedded
- EclipseLink with Derby server
- EclipseLink with H2 server
- EclipseLink with MySQL server
- EclipseLink with PostgreSQL server
- Hibernate with Derby embedded
- Hibernate with H2 embedded
- Hibernate with HSQLDB embedded
- Hibernate with SQLite embedded
- Hibernate with Derby server
- Hibernate with H2 server
- Hibernate with MySQL server
- Hibernate with PostgreSQL server
- OpenJPA with H2 embedded
- OpenJPA with HSQLDB embedded
- OpenJPA with Derby server
- OpenJPA with H2 server
- OpenJPA with MySQL server
- OpenJPA with PostgreSQL server
- ObjectDB embedded
- ObjectDB server