Re: S.O.D.A. database Query API - call for comments

From: Carl Rosenberger <carl_at_db4o.com>
Date: Tue, 8 May 2001 19:14:04 +0200
Message-ID: <9d99ik$reg$02$1_at_news.t-online.com>


mikito Harakiri wrote:
> >Again:
> >What is the difference in linking objects by object-ids in comparison to
> >linking objects by relational keys?
>
> Object references in general are one-way only, right? Is it technically
> impossible to directly navigate from detail to master, then. Find all
 purchase
> orders with item #12 on the list. Oh, I forgot, oodb will bring all the
 orders
> into memory...

If you have a look at our approach
http://www.odbms.org/soda/soda.zip
it does include constraining resultsets by superobjects.

Which object database loads all objects into memory for query evaluation? Ours does not.

Object references are "one-way" on instantiated objects. The implementation of the abstract representation within the engine may vary. Indices can provide the same retrieval speed for "object constrained by parent" as for "object constrained by member".

How are keys modeled within a relational database? A foreign key is always one-way.

If you imply the advantage of the usage of link tables: Of course you can use "link objects" in object databases to link two objects, but that is usually unnecessary complexity. Object databases provide closer language bindings than relational databases. You can use the native language collections and untyped object variables to model 1-to-n relationships.

> Unless, oodb starts maintaining double-linked references, you can't claim
 that
> it could easily match quering capability of relational. And adding
 double-linked
> references to object model compromises the simplicity that object folks
 are
> emphasising.

An object-oriented link is alwas bidirectional: - An object has a member.
- A member object has a parent.

Although the programming languages provide no method to navigate the wrong way around, object database query optimizers have not problems in understanding this bidirectional reference.

I think you accidentally pointed to an advantage of object databases with your posting.
Thanks.

Kind regards,
Carl

---
Carl Rosenberger
db4o - database for objects - http://www.db4o.com
Received on Tue May 08 2001 - 19:14:04 CEST

Original text of this message