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

From: Jim Melton <jim.melton_at_lmco.com>
Date: Thu, 30 Aug 2001 14:59:54 -0600
Message-ID: <9mm9gc$l7m1_at_cui1.lmms.lmco.com>


"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)

I use primarily ObjectivityDB. The bi-directional nature of the association is declared in the DDL. You have options to propagate deletes and locks through the association. Removing a bi-directional association (or setting it to point to another object in the case of a to-one association) sets the other end of the association to NULL.

Note that as with all attributes/methods, access to the association is public/protected/private as specified in the DDL. So the class/database designer can decide whether to forbid direct access to the association or cascade delete if he wants to.

> > 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)

This is purely subjective. SQL is still programming and is somewhat more difficult to debug than "classic" programming languages.

> > 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.

Objectivity does have read/write programmatic access to the schema. However, I'm not sure I'd like a design that was changing the underlying data representation on me. Do you routinely change meta-model info from within the application? Received on Thu Aug 30 2001 - 22:59:54 CEST

Original text of this message