Skip to main content

RDBMS vs ODBMS

7 replies [Last post]
wte
Offline
Joined: 2003-11-06
Points: 0

Hi everyone!

Currently I'm writing small and fast Java application server for remoting and communication using technologies such as Flash for example.

I'm thinking about using Spring + Hibernate + MySQL. But I've recalled that there are also ODMBS Java databases. I googled the web for searching such engines and found prevayler and db4o. These engines are really cool and pretty easy to use. But on the prevayler website I read that this mechanism is 3000 times faster than MYSQL :O . Does anybody has experience with ODBMS? What can you say about ODBMS performance ?

Regards
Jacek

Message was edited by: wte

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
greeneyed
Offline
Joined: 2003-06-10
Points: 0

Well,

It's not the same (When talking about keeping things in memory) . When Prevayler talks about keeping objects in memory, it means inside the JVM, so the good side is that accesing the data is just grabbing it from the JVM memory, whereas MySQL, Oracle, WhateverDB in memory means it is in another process in RAM, so even though it is faster, you still incurr on the network overhead and the marshalling and unmarshalling of the data to be sent through the network protocol, allocate the space in Java for the data...

That is the reason why it is so fast. Nothing magic but the same principle of caching things in memory instead of writing them to disk. But this time you are "caching" your whole database :D.

I have used for some projects an in-memory database, but one of those that still have a standard JDBC interface, as this allows me to use the same techniques/libraries etc that I use for other projects where an external database is necessary. And in those cases, it worked wonders, see an example here:
http://www.greeneyed.org/guide/java/
and here (same webapp, different style):
https://javatools.dev.java.net/links.html
The application was migrated from a "regular" database to an in-memory database in minutes, literally, thanks to both using JDBC.

Now, choosing between object-oriented databases or relational ones is another subject. From my limited point of view, I have no hands-on experience on ODBMS, the problem is that many applications need to use an already defined database or a database that needs to be shared with other legacy systems, and that means ODBMS is not an option as it is not widespread. That also means that there is more knowledge about relational systems, options, how to create/mantain/debug them etc...

In the end, if/when ODBMS show their true promise, they will become more widespread, you'll have more options to choose, a bigger knowledgebase etc. But I don't think the change will happen overnight.

However, if you are going to develop a self-contained application or all the applications that will communicate with it will be able to communicate with the ODBMS, then you might want to have a go.

Time will tell.

Message was edited by: greeneyed

wte
Offline
Joined: 2003-11-06
Points: 0

Greeneyed, You're right. One of the biggest disadvantage of ODBMS is that they aren't widespread (much smaller knowledge than for RDBMS and probably 99% of database applications are using relational databases).

But when you are creating some system using one technology (such as Java) and you are at starting point of developing you can choose ODBMS (at this moment for me is the better option than RDBMS)

Finally after reading the manuals for db4o, I've decided to use this odbm in my application. Thanks everyone for replies. I'll let you know when I create some part of code about my impressions in speed and performance of such database.

Regards
Jacek

hopeless
Offline
Joined: 2004-03-17
Points: 0

All prevayler objects are kept in memory, that's why it's so fast. Read the FAQ: http://www.prevayler.org/wiki.jsp?topic=PrevalenceSkepticalFAQ

wte
Offline
Joined: 2003-11-06
Points: 0

Yes, I know that it has all the data in memory, but MySQL can be configured to use RAM and it isn't as fast as Prevayler ;) I've also tried db4o and it looks good too :D

Hopeless, do You have any experiences with ODBMS? What do you prefer to use (object or relational database) ?

Regards
Jacek

pavelt
Offline
Joined: 2005-09-02
Points: 0

ODBMS are very fast when looking for objects with known ID (OID). Usually you have one index which translate OID directly to disk offset where specific object could be read. However querying ODBMS with complex queries like in Oracle is sometimes impossible and usually slow. Relational database are focused on optimal storage, object databases could be optimized for applications. That's is primary difference. Object model is more application specific than relational model which is data specific.

carlrosenberger
Offline
Joined: 2003-12-01
Points: 0

pavelt,

Speaking for db4o:

- We do provide indexes for class fields and a querying processor that understands them. Benchmark results are visible and testable here:
http://www.polepos.org

- Our internal IDs map to physical pointers, so they do not even need an index. We only use one single pointer indirection for transactional purposes. This systematic is proven to be the fastest algorithm possible to get from an ID to an object.

- We are working on "Native Queries", 100% Java database queries. They will let you write very complex queries very easily: You can work object-oriented. A paper about the concept is available for download here:
http://www.odbms.org/experts.html

- Indeed one of the strengths of object databases is that the coupling between data model and application model can be very tight, many ODBMS applications just use one single model. That way you are most productive during development and you minimize maintenance costs. If you want to achieve "data specific" decoupling of data model from application model in the way RDBMS force you to work, noone stops you from doing the same with an ODBMS. Actually it's easier to map objects to objects than objects to tables. We provide "translators" to help you with this task.

Best,
Carl
--
Carl Rosenberger
Chief Software Architect
db4objects Inc.
http://www.db4o.com

wte
Offline
Joined: 2003-11-06
Points: 0

Carl,

I've familiarized myself with the pole position. I didn't knew that HSQLDB is so fast :O But when someone need to develop trully object oriented applications he must use O/R mapping technologies such as Hibernate or JDO (unfortunetlly these mappers have a strong negative impact on performance of HSQLDb).

So, I don't change my mind - I'll use db4o in my project.

Regards
Jacek