Re: [T] Clean Object Class Design -- What is it?

From: Rico <TrooperRico_at_bugplanet.com>
Date: Sat, 21 Jul 2001 23:34:33 GMT
Message-ID: <xVH17.1401$G42.2431_at_newsfeed.slurp.net>


"Topmind" <topmind_at_technologist.com> wrote in message
> >
>
> This is highly dependent on the implimentation. Many modern
> RDBMS use up ZERO space for empty fields. In other words,
> the physical length of the record in storage is variable.
> The absence of a field-value pair in the record can internally
> signify that the field is empty/null/blank.
>

Agreed, you make a good point. However, if you develop an inheritance tree of three or four levels, then the number of child classes can be potentially large. This makes the corresponding relations also quite large and awkward to deal with. Even if you're not physically hauling any baggage, you're conceptually packing a lot of useless info around. Now if you are maintaining this through an O-R mapping tool, and the implementation is hidden from your application ... even this may not be a big deal.

I guess what's troublesome to me is that we have to build some complex/awkward constructs in an RDBMS to represent something that is quite natural in the object-oriented realm. However, I'm not an OODBMS zealot. An RDBMS is the superior choice for systems where diverse applications will be accessing a central data store. I tend to like OODBMSs for application-specific data stores (embedded apps in particular).

>
> As far as modeling, I agree with the prior message that
> you have not established a sufficient basis for
> "subtyping" here. Those "types" you gave could change,
> merge, etc. (I can envision commercials for a
> half sportscar and half SUV, or new gov laws WRT
> classifications.) One should only subtype if the divisions
> are permanent and significant. (I rarely find those
> for commerical and biz apps, BTW.)
>

This is why I made the next example completely abstract. The point wasn't to have a toy example picked apart, but instead to illustrate the problem of representing inheritance using an RDBMS. I guess I should have stated that more clearly when I presented the initial problem. Typical issues with communicating via Usenet I suppose. :-) Received on Sun Jul 22 2001 - 01:34:33 CEST

Original text of this message