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

From: Craig Shearer <craig.shearer_at_no_spam_please_bigfoot.com>
Date: Fri, 31 Aug 2001 07:59:10 +1200
Message-ID: <3b8e9bff$1_at_clear.net.nz>


"Sascha Bohnenkamp" <bonito_at_mevis.de> wrote in message news:3B8E1FC3.D4F6EED7_at_mevis.de...
> > And
> > for bi-directional associations, it enforces referential integrity.
> which OODBMS does this and what is the kind of 'enforcement'?
> Is it only a setting of the bi-link to NULL or more?
> (rdbms forbid those actions or do a delete on cascade if you want them
> to)

The ODBMS I use (JADE) does this. You define inverse relationships between reference properties (either singular references or collections) on classes. When you define the inverse, you also define whether the relationship is parent-child or peer-peer. In the case of a parent-child relationship, if the parent object is deleted, then this will cascade delete the child object. In the peer-peer case, deleting the object at one side of the relationship will automatically update the other object's reference to it to null.

>
> > I find that a normalized model does not usually consist of stand-alone
> > entities. For example (again), a contact database should have multiple
> > phone numbers for a contact. Perhaps each number would include a
> > "type" tag (home, cell, etc.). In order to associate this phone
> > information with the contact info, either a synthetic ID must be
> > generated or the primary key values must be replicated. I'd rather
> > just store the array of phone numbers with the contact where they
> > belong.
> well, but with a RDBM you are able to put contraints etc. into your
> tables to
> enforce a consistent state of the data. AND this is visible without
> reading the C++ (or whatever)
> sources ... and protects the data against programming errors.
> (the sql-rules for enforcing are much more simple than c++, java,
> smalltalk etc. and therefore have less errors)
>
> > I find an object database a marvelous tool for managing complexity. To
> > each his own.
> I miss the ability to view the meta-model in a convenient way.
> AND i like to be able to query/change the meta-model even from within
> the application (if needed) .. what seems
> to be impossible to do with all OODBMS I know of.

In JADE you have access to the meta-model, but you can't programatically change it.

Craig Shearer

--
Chief Architect
Helix Software Limited
http://www.helix.co.nz
Received on Thu Aug 30 2001 - 21:59:10 CEST

Original text of this message