Re: Clean Object Class Design -- What is it?

From: Carl Rosenberger <carl_at_db4o.com>
Date: Sat, 21 Jul 2001 23:34:34 GMT
Message-ID: <9i7jpb$j5j$05$1_at_news.t-online.com>


Bob Badour wrote:
[storing objects to columns of relational databases]
> >This approach can not even be used to store and restore a person and
> >his address if both are objects in the programming language.
>
> That depends on whether address is encapsulated within person.

Would that be a wise approach to be able to query the address individually or to maintain the address individually? Not really.

How would your database approach manage to put two objects back together again?
- on person in one column of one row
- one address in another column of another row Would the database know, how to do this automatically?

Object databases do not need to worry about "encapsulation". Every object is stored as such with full rights.

> >An OO application links many objects together. I would like to preserve
> >these links and restore them.
> >...like person and address...
>
> A tuple links many objects together. Each object can have arbitrary
 internal
> complexity. What is your point?

Where is the borderline?
Assume that you have an object network of 10,000 objects, all linked together by class-member relationships.
Which objects would you store to which column of which row and why?

I would like to query for each object individually and I would like to start instantitating the object network from the objects returned by the query. I definitely don't want multiple instantiations of the same object. If another query has previously returned one of the objects I am interested in and my application is already working with it, I want a reference to this object, not a duplicate.

> >I also want to make sure, that a stored object is only instantiated once.
>
> Define instantiation. If you create several indexes on "objects", you will
> have redundant data in the index. Is that not redundant instantiation?

No, I think you don't know the term instantiation. Instantiation means "creating an object instance" and in this context "creating an object instance in the application from a byte representation in persistent storage".
You could think of it as "marshalling takes an object apart" and "instantiation puts it back together again".

> In the relational model, one has full control over how many times an
 object
> value is physically stored in the database. Once, twice or a million
times.

Great, but where is the usecase?
You only want to store objects once.

How does a relational database ensure, that an object is put together only once and that the following queries return this one-and-only-individual-object?
There is no mechanism.

> >The object "exists" on the persistent storage (hard disc) ?
>
> The relational model deals with the logical view of the data. Logically,
 the
> object exists no matter what physical storage is chosen. Given physical
> independence, one has full control over whether the object directly exists
> intact somewhere on disk.

An object can not exist "intact" on a hard disk. The hard disc stores a byte representation. A running program instantiates objects. This process consumes a lot of time. Ideally an object database performs queries against the byte representation, if possible, to speed up performance. This is not possible in your "storing objects to relational columns" approach.

> However, you destroy your own credibility when you "question" statements
> whose truth I have repeatedly demonstrated. Eventually, you force me to
 deal
> with the credibility issue directly.

You post statements like "relational databases are OO" which are unquestionable false.

Repeating these statements with insults, rude words and "straw man" comments does not serve your credibility.

[Are Bob Badour and Lee Fespermann the same person?]
> Or are you going to go to the absurdity of suggesting that Lee calls
> long-distance to Canada to post messages as me?

Very probably not.

I did not research the message references in the sources of your postings. I only see many signs:

- rude insults
- similar vocabulary
- storing objects to columns
- your cc. to Lee in the mail you sent privately to me
- your *extremely* small Google usenet history, compared with the traffic
you post here
- the absence of Lee's responses while you post

Kind regards,
Carl

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

Original text of this message