Re: What is Aggregation? Re: grouping in tuple relational calculus

From: Jan Hidders <jan.hidders_at_REMOVETHIS.pandora.be>
Date: Sun, 20 Feb 2005 12:57:57 GMT
Message-ID: <pP%Rd.16249$UG1.1279164_at_phobos.telenet-ops.be>


Dawn M. Wolthuis wrote:
>
> I will attempt to explain how I think we can introduce these more complex
> data structures into the mix without making queries more procedural, but
> violating other (non-essential, in my opinion) aspects of relational theory.
>
> Let's say we admit sets, bags, lists, and trees, but our declarative query
> language works only against single logical functions (relations with primary
> keys). Every such function is just one single (logical) relation, where
> every "column name" a user can use in the query is defined (somewhat like a
> View). The definition of each function includes a base relation name and
> each defined column includes "code" for the function that maps this column
> name to some derivation from columns in this or other base relations. [...]

Er, Dawn, you have just been nominated for the "best description of the Functional Data Model, FDM, that doesn't mention that name" award. ;-)   Note by the way that although this is an old model it has actually seen some renewed interest recently. E.g.:

   http://www.csd.abdn.ac.uk/~gjlk/mediator/report.html

> Did I successfully demonstrate how to introduce more complex data structures
> into the mix without introducing procedural code or fail to do that? --dawn

Being declarative is not just about avoiding procedural code, it is about making it easy for the optimizer to come up with alternative equivalent implementations. Avoiding procedural code is a part of that, but not the full story. Because finding alternative implementations is much harder for list operations than for set operations the model should persuade the modeller to use sets rather than lists whenever possible. This is a crucial feature of the relational model.

However, if you remove the lists from your data model and replace them with sets then you have something wich is essentially equivalent with the relational model restricted to binary relations. As useful and interesting as that might be, I would not call that "extending the relational model with more complex data structures".

  • Jan Hidders
Received on Sun Feb 20 2005 - 13:57:57 CET

Original text of this message