Re: Object-relational impedence
Date: Wed, 05 Mar 2008 20:41:59 +0000
Message-ID: <fqn0ir$mdg$1_at_aioe.org>
Marshall wrote:
> On Mar 5, 9:31 am, S Perryman <q..._at_q.net> wrote:
M>Object oriented languages work in object-at-a-time terms. M>Even when those objects are collections, if one wants to M>operate on every object in the collection, one iterates M>over the objects in the collection and calls methods on M>those objects one at a time. M>The relational model works in set-at-a-time terms. One M>operates on entire sets at once. >>This is a fallacy.
>>In any system, if I have a set S of tuples (x,y) , and request the >>following :
>>{ e IN S : e.x = 123 }
>>I have to examine each tuple in the set to find those that satisfy the >>predicate. The satisfying tuples do not appear by magic.
> I don't understand what point you're trying to make here.
> Are you talking about the language or the implementation?
Both.
> You use set-builder notation to describe a set. In the
> relational model, something very nearly identical would be
> used. It is a single set-oriented expression. In an OOPL,
> one would iterate over a collection. Inside a loop, one
> would find expressions or statements written against
> single objects.
boolean f(Tuple t) { return (t.x = 123) ; }
Set<Tuple> S ;
Set<Tuple> t = S.match(f) ; // or match(S,f) if one prefers
- How is the above not "set-oriented" ??
A set is given as input to a match operation which produces a set as output.
2. I have no idea whatsoever *how* S performs the match by
looking at the above.
> The semantics might be the same; the languages are different.
The semantics are the same.
The syntax may be different.
The implementation (technique, performance) may well be the same.
M>The two don't fit together very well.
>>Particular *implementations* of OO prog langs may not fit well with a >>relational execution engine. But some (OO implemented on Functional >>programming infastructure etc) fit very well ( "lazy" programming >>etc) .
> Again, I don't understand what you're trying to say. I am discussing
> differences at the language level, not implementation differences.
Are we arguing about whether one syntax for expressing set operations is better than the other ??
> Yes, we could implement either a relational or an OO language
> with a functional SSA intermediate language; this doesn't affect
> what the abstractions of that language are, or whether they
> are set-oriented or object-oriented.
> Also, lazy vs. strict seems a completely orthogonal issue; I don't
> see why you bring it up.
If you are debating language syntax (are you ?? ) , then no point whatsoever.
> As an *implementation* point, when one puts the two different
> kinds on languages on the wire
When one puts different kinds of *implementations* of the same behaviour ...
> one gets two different sorts of performance characteristics.
Can you define these "characteristics" for us ??
> These characteristics heavily
> favor set-oriented language. This isn't *necessarily* the case,
> true, but it is *actually* the case in every circumstance
> I'm aware of.
Unable to comment without above definitions.
Regards,
Steven Perryman
Received on Wed Mar 05 2008 - 21:41:59 CET