| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Functions and Relations
"Aloha Kakuikanu" <aloha.kakuikanu_at_yahoo.com> wrote in
news:1164051960.913651.234880_at_m73g2000cwd.googlegroups.com:
>
> NENASHI, Tegiri wrote:
>> "Aloha Kakuikanu" <aloha.kakuikanu_at_yahoo.com> wrote in >> news:1163794792.364269.246040_at_m7g2000cwm.googlegroups.com: >> > 1. Function invocation is a join: >> > >> > f(x) /\ x=1 >> > >> > 2. Function composition is a join: >> > >> > g(f(x)) <==> g(z,y) /\ f(y,x) >> >> I am not in agreement: the function composition takes two binary >> relations and gives one binary relation, it does not the arity. g o >> f = Z <-g- Y <- f- X loses the information about Y. The natural >> join increases the arity and onserves Y.
The composition of functions, it can be made commutative if one defines the function (domain, codomain) pairs, in a strange fashion, like the database relation tuples: (attribute, value). Then one can commute and compose on the common attribute.
>while
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.
>
>> It is interesting like a theory but please show with an example when >> the function-like-relation is more practical. Is it that you want to >> utilize the function with the relational algebra operators ?
What is the problem ? I think but I can be wrong that the SQL Server shows the function call in the execution plan. If it does not, it must not be very complex to implement.
> If
> 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 ....'
>How about
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 ?
>
>
Received on Mon Nov 20 2006 - 18:33:31 CST
![]() |
![]() |