# Re: Distributivity in Tropashko's Lattice Algebra

Date: 16 Aug 2005 10:01:40 -0700

Message-ID: <1124211699.964342.170670_at_o13g2000cwo.googlegroups.com>

vc wrote:

*> Marshall Spight wrote:
**>
*

> OK, I see. Notation is unimportant at this stage. Some remarks:

*>
**> 1. You of course know that a simple function application to the
**> columns in the select clause would give you the same result.
*

Yes. However, what I'm trying to work towards is a minimal algebra. Small size makes for simple code, and simple semantics.

*> 2. If you'd like to get rid of the select clause and use join, than we
*

> are back to the problem of infinite relations since our function is

*> materialized in the hypothetical database as a relation (unless you can
**> suggest another way of implementing the join).
*

If the join's operands have enough attributes in common, then the function can be applied fully at join time. If it doesn't, then we can consider it a partial application. (There may be some pathological edge cases; I have not explored this fully.)

> 3. You may be interested to know that Oracle (as well as MS SQL

*> Server) has so-called table functions. The table function behaves as
**> if it were a real table. One can say for example "select a,b,c from t1
**> join table(f)". If the table(f) cardinality is infinite, the query of
**> course will never complete. One can parameterize the "f" function in
**> order to make its cardinality finite, but parameterizing won't work in
**> general, obviously.
*

Interesting. Did I read that correctly that "table()" takes a function and converts it to a table? In that case, given that t1 is finite, couldn't we reduce/optimize the execution so that this did complete? Also, if f is not infinite, how is that expressed in the definition of f? (Or am I reading this incorrectly?)

Marshall Received on Tue Aug 16 2005 - 19:01:40 CEST