Copyright ©2007 T. H. Merrett

Aldat Relational Algebra

Wikipedia categories: programming languages, databases

Motivation

The classical relational algebra is incomplete, despite theorems to the contrary, in the face of advanced applications such as deductive databases, rule bases for expert systems, geographical and other spatio-temporal information systems, online analytical processing and datacubes, predictive modelling, data mining, and semistructured data. The Domain Algebra fills in much of this incompleteness, but the Aldat programming language needs a rationalization of the classical binary and unary operators as well as further facilities such as recursion, query quantification, text and pattern-matching capabilities, infinite relations, polymorphic relations, metadata, and generalized editors for end users.

Overview

The binary operators are best understood as two families, each extending to relations different aspects of binary operators on sets. The set-valued binary operators extend to a family including the natural and outer joins. The logic-valued binary operators extend to a family which includes natural composition and division.

The unary operators, projection and selection, are best extended to a single operator, the T-selector, which further extends to the QT-selectors to include quantifiers. A pattern-matching operator, grep, is best provided as a relational operator, not an operator on attributes. "Editors" are unary operators from the programmer's point of view, except that they do not execute an algorithm and then halt but provide some kind of perspective to an end user on a relation or a set of relations; the end user in turn sees an interactive interface with query and update capabilities oriented towards the particular objectives of the editor, be thay graphical, cartographical, textual, or some programming interface such as spreadsheet or logic programming language.

A function is a special case of a relation, mathematically, and instead of forcing some common mechanism for procedural abstraction into the language, Aldat exploits this mathematical perspective by providing code-based infinite relations, "Aldat Computations", which behave as functions and procedures but are invoked using existing relational syntax, notably T-selectors and natural joins. These are more flexible than conventional functions because they provide the opportunity to accept alternative sets of input parameters, such as a relation, and produce alternative sets of outputs.

Views supplement assignment statements, which materialize their results immediately on execution. They also support recursive views which define a relation in terms of itself or in terms of a chain of other relations which ultimately depends on itself. Applications range from transitive closure calculations to inference engines.

Relational attributes which themselves describe relations and attributes, add flexibility to the language, needed for aspects of data mining, datacube OLAP and schema discovery in semistructured data.

Further Reading

Links

QT-selectors,
Aldat Computations