Re: Objects and Relations

From: David BL <davidbl_at_iinet.net.au>
Date: 29 Jan 2007 20:30:15 -0800
Message-ID: <1170131415.670718.53570_at_q2g2000cwa.googlegroups.com>


On Jan 30, 12:11 pm, "Marshall" <marshall.spi..._at_gmail.com> wrote:
> On Jan 29, 6:19 pm, "David BL" <davi..._at_iinet.net.au> wrote:
>
>
>
> > You seem to assume objects only ever have a transient purpose. I
> > don't agree with that. For example, a compound document system is a
> > good candidate for OO and the text, images etc need to persist.
>
> I disagree.

You think the relational approach is all encompassing?

> > Note that some people erroneously believe that RM is appropriate for
> > storing the individual characters in text or the pixels in an image.
>
> If we omit the incorrect use of the word "erroneous" and replace
> the word "store" with something more applicable like "model" then
> I'm one of those people.

I agree that erroneous is a little strong.

I take your point that "store" suggests a physical implementation rather than a logical model. That was not my intention.

> > My criterion predicts that OO is more appropriate in these cases (and
> > irrespective of lifetime concerns).
>
> I agree with you that lifetime is not an issue, but I disagree
> with the rest.
>
> > You can see when RM is stretched beyond its limits. For example a
> > relational representation of text is woefully inefficient, and more
> > importantly its logical model breaks the encapsulation of the string
> > as an ADT.
>
> Here you commit a variety of errors, the most obvious one being the
> confusion of the logical and physical.

I know and understand that a logical model of a string can be relational and yet the system cleverly uses arrays of characters for the physical implementation. I agree this is possible in principle and perhaps even in practise. Nevertheless reliance on such a clever system must at least be seen as a disadvantage of the relational approach. It is wrong for theory to completely ignore (today's) practise. However since this is a theory newsgroup I'm prepared to be idealistic about separation of logical and physical.

My point above was that there are (also) disadvantages from the logical perspective.

What is a reasonable relational representation of text? Head tail lists break encapsulation by exposing substrings with fabricated identity in the logical model (giving it the disadvantages normally associated with a physical model).

A relation keyed on string id and character index position requires a relatively complex integrity constraint, and mutative string processing algorithms are forced to emit complex updates to adjust index positions whenever characters are inserted or removed from the middle of a string. This is required at the logical level. Somehow you expect the system to efficiently map these logical updates into corresponding manipulations on arrays of characters. I find that a stretch. It is asking too much. There is something wrong when the logical model is less parsimonious than the physical optimisation.

These are clear disadvantages of RM here. Are there any advantages? Received on Tue Jan 30 2007 - 05:30:15 CET

Original text of this message