Skip to main content

Naive Evaluation of Recursively Defined Relations

  • Chapter
On Knowledge Base Management Systems

Part of the book series: Topics in Information Systems ((TINF))

Abstract

We address the problem of evaluating a recursively defined relation. We are given an equation of the form:

$$ R = f\left( R \right) $$

where f is a monotonie relational algebra expression and we want to evaluate the least fixpoint of that equation. We first recall that there is a simple naive evaluation of this solution and we argue that its performance is poor because it generates duplicate computations.

To solve this problem of duplication, we define a simple differential calculus on relational expressions. The goal is to see how a relational expression of the form f(R) increases when R is replaced by R+dR. The differential is thus defined as f(R+dR) - f(R). We give simple rules to compute the differential of relational expressions, using join, composition, union, intersection, projection, and selection. We also give optimized expressions for the differential when specific conditions, such as functional dependencies, hold. Finally, we show how the differential of an expression can be used to produce an “optimal” evaluation of a least fixpoint. This is done (i) by giving a logic-based definition of performance, and (ii) demonstrating a relational algebra program that computes the least fixpoint of a recursive equation and showing some optimal properties of that relational algebra program.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aho, A., J. Ullman, “Universality of Data Retrieval Languages”, Sixth ACM Symposium on Principles of Programming Languages, 1979.

    Google Scholar 

  2. Chandra, A. and Harel, D., “Computable Queries for Relational Data Bases”, JCSS 21, 156–178, 1980.

    MathSciNet  MATH  Google Scholar 

  3. Chandra, A. and Harel, D., “Horn Clauses and the Fixpoint Query Hierarchy”, Proceedings First PODS, 1982.

    Google Scholar 

  4. Chandra, A. and Harel, D., “Structure and Complexity of Relational Queries”, JCSS 25, 99–128, 1982.

    MATH  Google Scholar 

  5. Chang, C., “On the Evaluation of Queries Containing Derived Relations in Relational Database”, in Advances in Data Base Theory Vol.1. H.Gallaire, J. Minker and J.M. Nicolas (eds.), Plenum Press, New York, pp 235–260, 1981.

    Google Scholar 

  6. Henschen, L. J. and S. A. Naqvi, “On compiling queries in recursive first-order databases”, J. ACM, Vol. 31, No. 1, pp. 4785, January, 1984.

    Google Scholar 

  7. McLeod, D. and J.M.Smith. “Abstraction in Databases”, Proc. of Workshop on Data Abstraction, Databases and Conceptual Modelling, M.L. Brodie and S. Zilles (eds.), ACM SIGMOD Record Vol.11, No.2, January 1981.

    Google Scholar 

  8. Naqvi, S., “Interfacing Prolog and Relational Databases: The Problem of Recursive Queries”, Proceedings 1st International Workshop on Expert Database Systems, Kiawha, October 1984.

    Google Scholar 

  9. Naqvi, S. and Henschen, L., “Synthesizing Least Fixed Point Queries into Non-recursive Iterative Programs”, Proceedings IJCAI 83, Karlsruhe, 1983.

    Google Scholar 

  10. Ullman, J. D., Principles of Database Systems, Computer Science Press, Rockville, Md., 1982.

    MATH  Google Scholar 

  11. Ullman, J., “Implementation of Logical Query Languages for Databases”, ACM Transactions on Database Systems, Vol. 10., No. 3, pp. 289–321, 1985

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1986 Springer-Verlag New York Inc.

About this chapter

Cite this chapter

Bancilhon, F. (1986). Naive Evaluation of Recursively Defined Relations. In: Brodie, M.L., Mylopoulos, J. (eds) On Knowledge Base Management Systems. Topics in Information Systems. Springer, New York, NY. https://doi.org/10.1007/978-1-4612-4980-1_17

Download citation

  • DOI: https://doi.org/10.1007/978-1-4612-4980-1_17

  • Publisher Name: Springer, New York, NY

  • Print ISBN: 978-1-4612-9383-5

  • Online ISBN: 978-1-4612-4980-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics