Re: Functions and Relations

From: Aloha Kakuikanu <aloha.kakuikanu_at_yahoo.com>
Date: 20 Nov 2006 17:48:43 -0800
Message-ID: <1164073723.190203.250710_at_k70g2000cwa.googlegroups.com>


NENASHI, Tegiri wrote:
> "Aloha Kakuikanu" <aloha.kakuikanu_at_yahoo.com> wrote in
> news:1164051960.913651.234880_at_m73g2000cwd.googlegroups.com:
> > But then, both composition and join are
> > associative. Is it merely a coincidence?
>
> There are relation compositions that are not associative:
>
> 3 -2 - 1: let const3 = 3; m2:x ->x-2; m1:x->x-1;
>
> 'const3 o m2 o m1' is not associative.

Relation composition or function composition? In your example, both ways seems to produce const3.

Proof by googling: "function composition associative"

> > it is merely an expression, then what about corellated scalar
> > subquery:
> >
> > select (select dname from dept d where d.deptno=e.deptno)
> > from emp e
> >
> > How does one show scalar subquery on the expalin plan?
>
> Why it can not be shown like a nested loop: 'for each row-> select ....'

So it's a join of a function with relation?

> >How about
> > functon call
> >
> > select raise(sal) from emp
>
> I think it is more efficient to compute a function in comparaison of
> insert a formula in the tuple and then interpret the partially evaluated
> formula: it is how you are going to implement a function join in theory,
> no ?

I think so. Received on Tue Nov 21 2006 - 02:48:43 CET

Original text of this message