# Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)

From: Mikito Harakiri <mikharakiri_nospaum_at_yahoo.com>
Date: 1 Jun 2006 14:41:07 -0700

Dmitry A. Kazakov wrote:
> On 1 Jun 2006 13:07:49 -0700, Mikito Harakiri wrote:
>
> > Dmitry A. Kazakov wrote:
> >> Operations on functions (subprograms):
> >
> > These are easily defined in the realtional world (where we consider a
> > function as a relation)
> >
> >> 1. Mapping (call to) the tuple of arguments to the tuple of results
> >>
> >> Map : f x x1 x x2 x ... x xN -> y1 x y2 x ... x yN
> >
> > Calling a function f(x,y) with two arguments x=1 and y=2 is relational
> > join of three relations:
> >
> > 'z=f(x,y)' /\ `x=1` /\ `y=2`
> >
> > projected to attribute z.
>
> Where you get z for all possible x and y?

>From an index that corresponds to a function. Similar to index range
scan that brings tuples from an ordinary relation, a function index allows to eavaluate only a portion of an (infinite) relation.

> Another problem is that this is
> untyped.

Not just "some" constraints, but the one that says that in the relation R(x,y,z) the attribute z is functionally dependent of x and y.

> The third problem is that
> you need "=" for all things as well as literals for all things. It is a can
> of worms. Especially function literals aren't easy. What is a literal of
> sine?

> >> 3. Comparison
> >>
> >> = : f1 x f2 -> Boolean
> >
> > Comparison is the symmetric difference of the two relations. It is a
> > relation, not boolena value. Empty result means that the relations are
> > identical.
>
> This is non-constructive. Are you going to compare all inputs and outputs?
> Even if they model uncountable sets?

> >> 4. Copy (for marshaling, closures etc)
> >>
> >> := : f -> f
> >
> > Copying is not a logical operation.
>
> It is. You should consider the computational state as an additional
> parameter:

> >> 5. Convolution
> >>
> >> * : f1 x f2 x sum x prod x inv -> sum (prod (f(x), g(inv (x)))
> >
> > In your description I don't see how convolution is different from
> > composition.
>
> You have some free arguments and some bound arguments. Bound arguments run
> through some set.

Oh, you meant

sigma(x, f(x))

where x is bound variable and sigma is capital greek letter? Calculating aggregate values is a set join (relational division).

> It can be specified through relations, of course.
> Anything can be.

Specifying "everything" through relations is not as easy as your sentence might sound. Received on Thu Jun 01 2006 - 23:41:07 CEST

Original text of this message