| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: What is Aggregation? Re: grouping in tuple relational calculus
Dawn M. Wolthuis wrote:
> "Jan Hidders" <jan.hidders_at_REMOVETHIS.pandora.be> wrote in message
> news:pP%Rd.16249$UG1.1279164_at_phobos.telenet-ops.be...
>> >> Er, Dawn, you have just been nominated for the "best description of >> the Functional Data Model, FDM, that doesn't mention that name" >> award. ;-)
Yep. But this way you gave some more credence to the claim that it is a fairly intuitive and natural data model. :-)
> [...] It seems that those who have learned relational theory in
> colleges often think theirs is the only one where the mathematics has
> been worked out.
Yes. That is indeed regrettable. But there is a grain of truth in that in the sense that already at birth the relational model was already surrounded by a cloud of knowledge that it inherited from already existing research areas such as first order logic, finite model theory and computational complexity. Since then this cloud has only become bigger. On the other hand, this should also not be overstated. There are for exampole also close links between FDM and first order logic, and even between the XML data model and first order logic.
>> 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.
No argument there.
>> 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 mode.
For query optimization it definitely does. Especially for complex queries on large sets of data.
> By "optimizing", I'm still sticking to the logical side of this, not
> physical implementations, so I'm referring to optimal agility,
> productivity, etc. With ordering attributes rather than the DBMS
> handling ordered lists, joe average programmer (I'll switch from
> average housewife to average programmer here) has to perform inserts,
> ripple deletes and such, rather than permitting the database
> management system to handle.
We're back with the pizza toppings, are we? :-) It has already been argued before that often there will be one ore more natural attributes that define the ordering. I can only add to this that in my (admittedly very limited experience) this is usually the case. But even if it is not and you have to add an artifical seq# column, I don't see why Joe programmer cannot get his head around the fact that for a single insert into a list he has to do the following two updates:
UPDATE OrderItemToppings
SET ToppingSeq# = ToppingSeq# + 1
WHERE OrderID = :thisOrder: AND ItemNr = :thisItem:
AND ToppingSeq# >= :insertPlace: ;
INSERT
INTO OrderItemTopping ( OrderID, ItemNr, ToppingSeq#, Topping)
VALUES ( :thisOrder:, :thisItem:, :insertPlace:, :topping:) ;
![]() |
![]() |