Calculus versus algebra

From: Kai Großjohann <Kai.Grossjohann_at_CS.Uni-Dortmund.DE>
Date: Fri, 26 Jul 2002 22:56:03 +0200
Message-ID: <vaf4remcios.fsf_at_lucy.cs.uni-dortmund.de>



We have the Relational Calculus (tuple calculus and domain calculus?) and we have the Relational Algebra.

I'm having a bit of trouble to generalize that to other cases. What's the underlying idea that distinguishes the calculus from the algebra?

It seems to me that the idea behind the algebra is that we define what a query result should look like. In the case of RA, it's a set of tuples. Then we define operations that take such query results as inputs and produce query results as outputs.

And the idea behind the calculus is that we take one item from the result and apply a formula to it to see if it belongs to the result.

But suppose that I have something which produces sequences instead of sets. Then the algebra approach is still easy: just have operations which take sequences as inputs and produce sequences as outputs. But for the calculus it's not so easy. For having a formula which determines whether it belongs to the result won't help. Instead, we might have a formula which computes the index in the result.

Am I on the right track?

But if this is really right, then the above is not a very useful formalization, as finding the index in the result sequence requires to find out how many result items precede it. Then we might better just compute the whole result sequence. But that's just the algebra.

So I think that there is a misunderstanding on my part.

kai

-- 
A large number of young women don't trust men with beards.  (BFBS Radio)
Received on Fri Jul 26 2002 - 22:56:03 CEST

Original text of this message