Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)
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
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
Once again, a relation which is a function needs an index that would make evaluating relational expressions containing functions practical. Literals are not required. Whether the equality relation is needed is a deep issue.
> >> 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?
This is an interesting objection. While the question if the two functions are equivalent is certainly important from relational engine perspective (otherwise how would you do optimization?), it remains to demonstrate that the end-user migh ask this question as well.
> >> 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
> >> 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
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