The logical data language LDL is a rule based language for databases [NT89,Zan88] developed at Microelectronics and Computer Technology Corporation. LDL++ supports lists, sets, complex objects, recursion and extensible aggregates. In LDL++ every aggregate function f on a set is inductively defined by:
= S
{x} derive the
value of f(S
) from those of S and f({x})

In this extension of LDL++ the first function is called single, and the second one is called multi. We can rewrite count and sum as
