Benchmarks: Performance advantages to store complex object structures
db4o is fast. In the PolePosition open
source database benchmark db4o displays significant performance advantages,
especially when it comes to storing complex object structures. Several "circuits" represent different use cases. You can download,
modify, and run them for yourself.
circuit, for instance, shows transaction performance (writing, reading, querying and updating a deep object graph that is composed of multiple different classes with an inheritance hierarchy of 5 levels) for different database products
and data access methods. As you can plainly see, resolving the object-relational
mismatch by using an object-relational mapper like Hibernate costs
a lot of performance. db4o overcomes the trade-off between object-orientation and
speed: You can now store objects natively and enjoy great performance gains.
Benchmarks always depend on the nature of a tested task. The PolePosition authors deserve credit because they show which
database is a good fit for which task. The rule of thumb is: The flatter and simpler
the data, the better you perform with direct SQL access to relational databases,
e.g. by JDBC. When object structures become more complex, you can not afford to
ignore object databases. If performance is of concern, then Hibernate or other object-relational mapper solutions are not a viable choice, because their
negative impact on performance is dramatic.
Below are other benchmark "circuits" that demonstrate different use cases:
- writing, reading, querying and updating a deep graph of lists. Objects are partially reused within the lists
- writing, reading, querying and deleting objects of a class hierarchy with a depth of 5 levels
- writing, updating and deleting plain simple flat objects as well as querying for indexed int members and string members