Translation with optimization from relational calculus to relational algebra having aggregate functions
- 1 December 1990
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Database Systems
- Vol. 15 (4) , 518-557
- https://doi.org/10.1145/99935.99943
Abstract
Most of the previous translations of relational calculus to relational algebra aimed at proving that the two languages have the equivalent expressive power, thereby generating very complicated relational algebra expressions, especially when aggregate functions are introduced. This paper presents a rule-based translation method from relational calculus expressions having both aggregate functions and null values to optimized relational algebra expressions. Thus, logical optimization is carried out through translation. The translation method comprises two parts: the translational of the relational calculus kernel and the translation of aggregate functions. The former uses the familiar step-wise rewriting strategy, while the latter adopts a two-phase rewriting strategy via standard aggregate expressions. Each translation proceeds by applying a heuristic rewriting rule in preference to a basic rewriting rule. After introducing SQL-type null values, their impact on the translation is thoroughly investigated, resulting in several extensions of the translation. A translation experiment with many queries shows that the proposed translation method generates optimized relational algebra expressions. It is shown that heuristic rewriting rules play an essential role in the optimization. The correctness of the present translation is also shown. Each translation proceeds by applying a heuristic rewriting rule in preference to a basic rewriting rule. After introducing SQL-type null values, their impact on the translation is thoroughly investigated, resulting in several extensions of the translation. A translation experiment with many queries shows that the proposed translation method generates optimized relationalKeywords
This publication has 12 references indexed in Scilit:
- The EXODUS optimizer generatorPublished by Association for Computing Machinery (ACM) ,1987
- A rule-based view of query optimizationPublished by Association for Computing Machinery (ACM) ,1987
- Translating SQL Into Relational Algebra: Optimization, Semantics, and Equivalence of SQL QueriesIEEE Transactions on Software Engineering, 1985
- Query Optimization in Database SystemsACM Computing Surveys, 1984
- On optimizing an SQL-like nested queryACM Transactions on Database Systems, 1982
- Equivalence of Relational Algebra and Relational Calculus Query Languages Having Aggregate FunctionsJournal of the ACM, 1982
- Extending the database relational model to capture more meaningACM Transactions on Database Systems, 1979
- Optimization of query evaluation algorithmsACM Transactions on Database Systems, 1979
- DEDUCE 2: Further Investigations of Deduction in Relational Data BasesPublished by Springer Nature ,1978
- Optimizing the performance of a relational algebra database interfaceCommunications of the ACM, 1975