Re: Flamewar object databases vs. relational databases

From: Todd Gillespie <toddg_at_linux128.ma.utexas.edu>
Date: Sat, 21 Jul 2001 23:29:15 GMT
Message-ID: <9fbs6k$p62$1_at_geraldo.cc.utexas.edu>


In comp.databases.theory Carl Rosenberger <carl_at_db4o.com> wrote:
: You use the "_seq.nextval from dual" approach, that ORACLE recommends in the
: documentation. I was trying to point out that insertion of joined multiple
: rows requires data to go back and forth between client and server. In your
: example this does happen. This is where quite a bit of performance is lost.

Bah. That's one of the smallest possible queries. You also don't need to do it at all if you use _seq.currval on the subsequent rows. Not having subselects - that's where major lossage on the wire occurs.

:> : - where performance is of less importance than integrity :> ??? not sure how this is relevant as we are not designing the DB..  

: You could generate primary keys in a different way by prefetching a set of
: 100 or whatever from the server.

That's basically how Oracle's sequence object works - Oracle holds ~20 keys in RAM waiting to be tossed to clients. Grabbing 100 of them and managing them on client is redundant. Besides, sequences can typically run up to a 38 digit base-10 integer -- somewhat larger than a Java int, and no operator overloading means BigNum support is a PITA.

:> : - and multiple-users access the database :> ??? this is handled by the database...Oracle has MVCC locks, btw.  

: You could use select(max) or select _seq.curval in your insertion statement
: otherwise.

Not sure how that relates to multiple-users. The results are isolated from other clients until commit(); who cares what id method you choose?

: I was waiting for Bob to provide an answer. No matter with what he comes up
: with, there are drawbacks and performance deficits against an object
: database that inserts an inheritance hierarchy with one single statement. He

Using Oracle's CONNECT BY syntax (also an equiv. on DB2) I can produce an assembled tree from a single SELECT statement. Would I call this an object? No, because it has no associated behavior. It is a complex data structure. I see no dissimilarity to the approaches taken here. Perhaps we should call OODBSes Nested-Structure databases?

: No doubt, I am not.
: If you do have any database engine running next to you, ORACLE ot whatever:
: Running our benchmark code will cost you a maximum of 10 minutes.

ugh... it's saturday. I'll pass, and I'll leave usenet.

: Of course writing your own JNI driver will produce a better result.
: Would that be an intelligent recommendation as a consultant?
: "It depends" :-)

It's good for the consultant, at least -- getting paid to reinvent the wheel. Received on Sun Jul 22 2001 - 01:29:15 CEST

Original text of this message