Re: Functions in the relational context

From: Marshall <>
Date: Thu, 6 Mar 2008 14:22:20 -0800 (PST)
Message-ID: <>

On Mar 6, 1:45 pm, Tegiri Nenashi <> wrote:
> On Mar 6, 12:45 pm, "Yagotta B. Kidding" <> wrote:
> > I do not see how your exercise, whilst no doubt cute, discredits the
> > idea that FP can be fruitfully applied to the data management field.
> To explore this in any depth, let's clarify what FP is. The function
> is considered as a data?

Whoops, no, that's not it.

"Functional programming" describes a family of languages with many attributes in common but no hard a fast definition. The name is evocative of the primary position that functions are given. Treating functions as data per se is not a statement I would consider particularly descriptive. Rather I would say that in FP, functions are considered *first class* entities, in this sense of the term:

FP has a number of other connotations. Functions in FP typically (or in the case of pure FP *necessarily*) are free of side-effects. FPLs also usually make heavy use of algebraic data types

and use structural recursion to operate on them.

> I fail to see why this idea is significant.
> Care to support it with an example?
> > Care to provide the missing link/s in your logical chain, like, 'in the
> > RA we can do such and so, but in FP we cannot, therefore, FP is really
> > no good'.
> Well, we are not talking completenes, are we? Certainly, in RA we
> can't express certain things that even primitive procedural language
> can do, yet we agree that algebraic approach is a good idea.

Indeed the algebraic approach is a good idea. And anyone who appreciates this approach, and who has any background in abstract algebra for example, will find (I would expect) that function programming has a very familiar, very axiomatic feel to it.

> I'm not certain where this observation leads to. Combined with an idea
> that function composition is nothing more than a relational join, the
> intuition might be that an extension of the relational model don't
> necessarily require functional programming ideas.

Rather my take is, once we observe that function composition is nothing more than a relational join, we might then want to find a model that has the most mature, most axiomatic treatment of computable functions, so that whatever system we are designing, its treatment of functions will be as advanced as possible. And we find that model in the functional programming world.

Marshall Received on Thu Mar 06 2008 - 23:22:20 CET

Original text of this message