Re: Is it really that bad?

From: JRStern <JRStern_at_gte.net>
Date: Fri, 09 Mar 2001 15:55:19 GMT
Message-ID: <3aa8fb34.4011097_at_news.gte.net>


On Fri, 09 Mar 2001 04:39:21 GMT, "David Cressey" <david_at_dcressey.com> wrote:
>Sometime, I'm going to have to make time to read up on the
>Object-Relational model, or on how to design a relational DB starting from
>an analysis done using ORM. There must be a good way of reconciling these
>two world views.

Not necessarily -- they may really be separate.

Relational is about holding data in cannonical form for arbitrary forms of access. It is very good at this, but not perfect. It is well known that today's relational systems are poor at such things as temporal data, naturally hierarchical systems like BOM, geographical and spacial data. While various extensions have been tried, it is not clear whether The Answer has yet been found for any of these.

Object is about, ... hmm, I find it hard to find a word that doesn't carry wrong connotations. I don't want to say "code" because that omits the local data states of objects/instances. I don't want to say "systems" because that fails to respect the value of a separate relational store. "Logic" has the same fault as a term as "code". Let's say objects are about "action".

Say relational is (much) better at being a static store, and objects are better at being a dynamic medium. Your "reconciliation" would consist in keeping them separate and developing appropriate interface conventions. That is pretty much my belief.

Database tables do not map all that closely to real-world entities. I would say that object classes map much more closely. There is probably a dividing line of detail, beneath which it's better to let the database manage thing, above which it's better to arrange things in objects. This would entail a change in style from most OO systems I've seen, where an implicit or explict implementation goal is to "make everything a first-class object". I guess I'm saying that, as a general rule, it might be best NOT to assume that objects are the best tools down to the atomic level. I guess I'm saying that objects should be made out of lots of atoms, ... have to work on extending this metaphor! <g>

Joshua Stern
JRStern_at_gte.net Received on Fri Mar 09 2001 - 16:55:19 CET

Original text of this message