Re: S.O.D.A. database Query API - [OT]

From: Janek Bogucki <yan_at_studylink.com>
Date: Sat, 21 Jul 2001 18:01:06 GMT
Message-ID: <B716FB50.FBA8%yan_at_studylink.com>


in article 9cra5t$2ef$1_at_tobiasb.invalid, Tobias Brox at tobiasb_at_suptra.org wrote on 3/5/01 10:59 am:
> An object, at the other hand, is a construct that simulates the real
> world, and a construct that it's easy to deal with in a programming
> environment. Storing an object in tables is not a difficult task.
>
>> How about storing objects
>> as column values in table rows. Then you can keep a declarative query
>> language and be able to call methods on columns.
>
> Hm ... having one complete object as a single attribute in a table row?
> Must be a reference in that case? Or just a piece of binary data?

Though it would be easy to serialise an object into a binary large object the the database wouldn't allow access to the fields of the object because it wouldn't be aware of the object's structure.

In addition to handling the root object you would also need to handle referenced objects and store those as well. With Java serialisation the entire object graph is serialised to a stream. So this is impractical for large object graphs.

Plus, if the persistance capable class changed you would need to write routines to update the existing serialised objects to the new class layout. In the main you start to add object management facilities to your relational database. This is a mistake as you can either:

  1. Buy/download an object-relational database management system or
  2. Buy/download an object database management system

In either case you will save years of programming work.

> There is just one big catch, it's extremely difficult to make really
> good query optimizers. Try doing something really fancy with SQL, and
> the very most database servers will stall for ages before returning
> something. At my former workplace, I was even adviced that for a simple
> join over two tables, I should take out all data (90% unuseful data)
> from both tables and rather use perl to filter out the data I needed.

ODBMS can help eliminate the overhead of costly joins by storing the relationships between objects directly instead of using primary and foreign keys.

Best Wishes,
Janek Received on Sat Jul 21 2001 - 20:01:06 CEST

Original text of this message