Real World (Re: Mixing OO and DB)

From: topmind <topmind_at_technologist.com>
Date: Sun, 16 Mar 2008 19:58:59 -0700 (PDT)
Message-ID: <d367523b-7778-4e02-8724-67c523516cc8_at_i12g2000prf.googlegroups.com>


rpost wrote:
> Marshall wrote:
>
> >On Mar 8, 4:53 am, rp..._at_pcwin518.campus.tue.nl (rpost) wrote:
> >> David Cressey wrote:
> >> >Before I move on, I have to give an opinion based on my own data-centric
> >> >world view. If you don't understand the data, then you don't know what
> >> >you're talking about. In short, I completely fail to grasp how one can
> >> >understand a system in terms of "behavior" without understanding the data
> >> >that the behavior affects. This is something that it's going to take me
> >> >years of lurking in comp.objects to grasp.
> >>
> >> I don't think so. Can we understand the differences between sets,
> >> multisets, ordered lists, queues and stacks just by
> >> "understanding the data"?
> >
> >No, you're not following what David is saying, I don't believe.
> >Queues/stacks etc. are not objects in the domain of discourse.
> >They are data structures; they are part of the toolset. If this
> >was what was at issue, then one could be said to understand
> >any specific SQL database if one understood the relational
> >algebra.
>
> Yes, exactly; in the relational world, we're tied to a single data type,
> the relation, with particular operations on it. In the OO world we
> are generally concerned with specifying data types and their operations,
> and the semantics of these operations are known as "behavior" in the
> OO world.

You are comparing apples to oranges, perhaps exaggerating the power of "types".

[....]

> >It has no behavior. But often one can get extraordinary use out
> >of a read-only SQL database, provided one knows the semantics,
> >understands the data.
>
> Its "behavior" in the OO sense is the semantics of the relational
> query language.
>
> But for understanding, another thing is required: we need to understand
> what interactions with the real world the data correspond to.
> For instance, we might say that the numbers roughly correspond to what
> you'd get if you count all human beings in every country of the world and
> sort the resulting numbers in decreasing order. Although this operation
> is imaginary, it does bring the numbers into correspondence with reality,
> and that is what they mean. The explanations of OO that I've seen aren't
> very helpful here; they always leave the difference implicit between
> an OO model of something (with classes, properties, etc.) and that which
> it models (e.g. actual countries and numbers of persons). But the claim
> is that classes, properties etc. are in a one-to-one correspondence
> with things in reality. Relational databases attempt to do the same
> kind of modelling, but with the restriction that it is done entirely
> in terms of the relational model.

I cannot speak for every domain, but in the domain I am most familiar with: custom biz apps, there is no "real world". It's mostly dealing with intellectual property (money, invoices, laws, etc.) Even a paper invoice is merely a representation and not THE "invoice" per se. Paper is simply an old-style implementation. Before that they maybe used rocks or animal bones.

Thus, any operations used are artificial anyhow; all mental constructs. Now, I will agree that OOP generally models how a typical clerk might do it: one paper at a time and one operation at time via a cursor-oriented pencil. Manual labor has no real set operations. Manual labor is generally imperative and thus "navigational".

However, that is NOT the same as "modeling the real world", but rather modeling the old fashioned *implementation*. I don't think we'd make much progress if we tried to mirror early implementations all the time. Leonardo Davinci didn't get very far with planes that flap, for example. By focusing on the goal instead of existing techniques (birds), people realized that propellers and jets were more practical.

>
> >Marshall
>
> --
> Reinier

-T- Received on Mon Mar 17 2008 - 03:58:59 CET

Original text of this message