Re: Flamewar object databases vs. relational databases

From: Carl Rosenberger <carl_at_db4o.com>
Date: Sat, 21 Jul 2001 23:29:42 GMT
Message-ID: <9fg1ef$dcr$05$1_at_news.t-online.com>


Todd Gillespie wrote:
[Transferral of primary key back to the client for every inserted row]
> There's one number, plus associated error & environment info. More than
> small enough to pack into one TCP frame. That's almost totally
> unnoticable.

[snip]

> If all else fails, you can dig around in your manual and find the method
> to return the pkey of the last inserted row.
>
> This is a non-issue. Don't bother responding -- it's high time this
> thread sputtered to a gringing halt.

No, this clearly is an issue, even if you decide that it isn't.

Someone was complaining about OIDs exposed to the user in object databases, which they are not.

PrimaryKeys and ForeignKeys have to be exposed to the users of relational databases, otherwise they cannot link tables (unless they use an expensive and slow O-R mapper).
And best of all:
There is not even a standard to retrieve the last inserted primary key. On Oracle you typically use a sequence for every *single* table: "select ..._SEQ.curval from dual"
On MS SQL there is a global sequence for *all* tables: "select _at__at_identity "

Concerning the performance of keys going back and forth: There are applications that use 10 or more tables for one single object. Every table insert has to wait until the last insert is completed and the key is fetched with a select statement.
Does this scale?
Is it thread-safe?
Can parts be computed in paralell?
Is it necessary?

The more atomic (short time) you can make actual data processing, the more efficient your system can be, since you don't block other users. There are telecommunication applications where volume is extremely high. Can you afford to use a system here that
- is by factor 10 to 1000 slower in inserting data? - blocks many more resources for a longer period of time?

One key might fit very nicely into one TCP frame (although I doubt it, with all JDBC-ODBC overhead going on).
How does it perform in a WAN or in a mobile system where the connection might be lost?

Kind regards,
Carl

---
Carl Rosenberger
db4o - database for objects - http://www.db4o.com
Received on Sun Jul 22 2001 - 01:29:42 CEST

Original text of this message