Year: 1989
Type: report
Abstract: Designing and implementing a query optimizer and query processor for a nested rela.tional database system (DBMS) requires a number of steps like deciding on operations supported on nested relations (i.e. the semantics of a query language (QL)), defining a syntax (i.e. a concrete QL for the system), investigating equivalences among expressions of the QL, devising optimization strategies or rules, and finding efficient evaluation techniques for single operations of the QL and combinations thereof. While these activities are rather theoretical in nature, they obviously have tremendous impacts on the architecture and implementation of the corresponding DBMS. We have presented powerful operations on nested relations in an algebraic syntax in [SS86], investigated equivalence rules in this algebra in [Sch86, SPS87], and described the implementation of an efficient query evaluation algorithm in [DPS86, PSS+87]. Here we focus on the following problem: typical query evaluation techniques distinguish between simple and complex operations in the QL (like selections and projections vs. joins or sorting in the relational setting). The simple operations are executed on the fly in a rather low level of the DBMS architecture while more complex ones are processed on top of that layer. Classical examples of such architecures are System R (RDS on top of RSS [ABC+76, CAB+81]), Ingres (MVQP on top of OVQP [SWKH76]), LOLEPOPs in Starburst are a more recent example of simple operations [Loh88]. The idea behind such a dichotomy in query processing strategies is that (combinations of) simple operations can be computed while scanning data, hence on the fly , we will call them single scan operations in the sequel. Intuitively, we read in blocks from the disk, inspect tuples sequentially and compute the result of such operations without touching data more than once. Formally, these operations have linear complexity in the size of the involved relations. Other operations require inspecting single data elements more than once (like sorting, or joins with nested loops). The exact classification of operations into these two classes is crucial as to avoid unnecessary scans of the input data, particularly as this usually means reading in data from secondary storage. Among the relational operations, clearly selection is a single scan operation: while scanning tuples of the input relation sequentially, we can test the selection condition on each single tuple and decide whether it belongs to the result or not. Projections are only linear if we ignore duplicate elimination. Obviously, joins are not linear in general. Therefore, we find selections and projections in the lower level query processors (RSS, OVQP) and joins (together with the other non-linear operations) in the higher level query processors (RDS, MVQP) in typical relational DBMS architectures. In the flat relational context, the distinction seems to be quite evident. However, when switching to nested relations with corresponding new styles of operations things need a little more elaboration. Selection conditions may involve set comparisons, projections and selections may involve complex operations (like joins) on deeper levels of the nesting hierarchyl. New operations are added: nesting and unnesting. Deciding whether such operations are single scan processible or not is non-trivial in some cases. We present a model of query processing that explicates our intuition about single scan operations. Using this model we analyse the operations individually and consider expressions, i.e. compositions of operations. In designing such a model we have to be very careful, as can be seen from the following simple example. Our intuitive understanding is, of course, that join is no single scan operation, however, consider the following algorithm:
Source: KOPS (University of Konstanz)
Author: Marc H. Scholl
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W771571209
