Skip to main content
Log in

Towards an efficient evaluation of recursive aggregates in deductive databases

  • Regular Papers
  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

This paper is devoted to the evaluation of aggregates (avg, sum,…) in deductive databases. Aggregates have proved to be a necessary modeling tool for a wide range of applications in non-deductive relational databases. They also appear to be important in connection with recursive rules, as shown by thebill of materials example. Several recent papers have studied the problem of semantics for aggregate programs. As in these papers, we distinguish between the classes of stratified (non-recursive) and recursive aggregate programs. For each of these two classes, the declarative semantics is recalled and an efficient evaluation algorithm is presented. The semantics and computation of aggregate programs in the recursive case are more complex: we rely on the notion of graph traversal to motivate the semantics and the evaluation method proposed. The algorithms presented here are integrated in the QSQ framework. Our work extends the recent work on aggregates by proposing an efficient algorithm in the recursive case. Recursive aggregates have been implemented in the EKS-V1 system.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Abiteboul, S. and Grumbach, S., “A Rule-Based Language with Functions and Sets,”ACM Transactions on Database Systems, 16, 1, pp. 1–30, March 1991.

    Article  MathSciNet  Google Scholar 

  2. Bidoit, N. and Froidevaux, C., “Negation by Default and Unstratifiable Logic Programs,”Technical Report, 437, LRI, Orsay, 1988. To appear in a special issue ofTCS on Research in Deductive Databases.

    Google Scholar 

  3. Bidoit, N. and Legay, P., “WELL! An Evaluation Procedure for All Logic Programs,” inProc. of the 3rd Int. Conference on Database Theory (ICDT), Paris, France, December 1990.

  4. Balbin, I., Meenakshi, K., and Ramamohanarao, K., “A Query Independent Method for Magic Set Computation on Stratified Databases,” inProc. of the International Conference on Fifth Generation Computer Systems (FGCS), Tokyo, Japan, pp. 711–718, November 1988.

  5. Beeri, C. and Ramakrishnan, R., “On the Power of Magic,” inProc. of the 6th ACM Symposium on Principles of Database Systems (PODS), San Diego, California, March 1987.

  6. Beeri, C., Ramakrishnan, R., Srivastava, D., and Sudarshan, S., “Magic Implementation of Stratified Logic Programs,”Technical Report, unpublished manuscript, August 1990.

  7. Beeri, C., Ramakrishnan, R., Srivastava, D., and Sudarshan, S., “The Valid Model Semantics for Logic Programs,” inProc. of the 11th ACM Symposium on Principles of Database Systems (PODS), San Diego, California, June 1992.

  8. Bry, F., “Logic Programming as Constructivism: A Formalization and Its Application to Databases,” inProc. of the 8th ACM Symposium on Principles of Database Systems (PODS), Philadelphia, Pennsylvania, pp. 34–50, March 1989.

  9. Bry, F., “Query Evaluation in Recursive Databases: Bottom-Up and Top-Down Reconciled,” inProc. of the 1st International Conference on Deductive and Object-Oriented Oriented Databases (DOOD), Kyoto, Japan, pp. 95–112, 1989.

  10. Brodsky, A. and Sagiv, Y., “On Termination of Datalog Programs”, inProc. of the 1st International Conference on Deductive and Object-Oriented Databases (DOOD), Kyoto, Japan, pp. 95–112, 1989.

  11. Consens, M. P. and Mendelzon, A. O., “Low Complexity Aggregation on GraphLog and Datalog,” inProc. of the 3rd Int. Conference on Database Theory (ICDT), Paris, December 1990.

  12. Cruz, I. and Norvell, T., “Aggregative Closure: An Extension of Transitive Closure,” inProc. IEEE 5th International Conference on Data Engineering, pp. 384–391, February 1989.

  13. Dietrich, S. W., “Shortest Path by Approximation in Logic Programs”,ACM Letters on Programming Languages and Systems, 1, 2, pp. 119–137, June 1992.

    Article  Google Scholar 

  14. Freeston, M., “The BANG File: A New Kind of Grid File,” inProc. of the ACM SIGMOD Conference on Management of Data, San Francisco, California, pp. 260–269, May 1987.

  15. Ganguly, S., Greco, S., and Zaniolo, C., “Minimum and Maximum Predicates in Logic Programming”, inProc. of the 10th ACM Symposium on Principles of Database Systems (PODS), Denver, Colorado, May 1991.

  16. Ganguly, S., Greco, S., and Zaniolo, C., “Greedy by Choice,” inProc. of the 11th ACM Symposium on Principles of Database Systems (PODS), San Diego, California, June 1992.

  17. Klug, A., “Equivalence of Relational Algebra and Relational Calculus Query Languages Having Aggregate Functions”,Journal of the ACM, 29, 3 pp. 699–717, July 1982.

    Article  MATH  MathSciNet  Google Scholar 

  18. Kerisit, J. M. and Pugin, J. M., “Efficient Query Answering on Stratified Databases”, inProc. of the International Conference on Fifth Generation Computer Systems (FGCS), Tokyo, Japan, pp. 719–725, November 1988.

  19. Kemp, D. and Stuckey, P., “Semantics of Logic Programs with Aggregates”, inProc. of the International Logic Programming Symposium, 1991.

  20. Kemp, D. B. and Topor, R. W., “Completeness of a Top-Down Query Evaluation Procedure for Stratified Databases,” inproc. of 5th Int. Conference and Symposium on Logic Programming (R. A. Kowalski and K. A. Bowen, eds.), Seattle, WA, pp. 178–194, August 1988.

  21. Lefebvre, A., “Towards an Efficient Evaluation of Recursive Aggregates in Deductive Databases,” inProc. of the International Conference on Fifth Generation Computer Systems (FGCS), Tokyo, Japan, pp. 915–925, June 1992.

  22. Lefebvre, A. and Vieille, L., “On Deductive Query Evaluation in the DedGin* System,” inProc. of the 1st International Conference on Deductive and Object-Oriented Databases (DOOD), Kyoto, Japan, pp. 95–112, 1989.

  23. Mumick, I. S., Pirahesh, H., and Ramakrishnan, R., “The Magic of Duplicates and Aggregates,” inProc. of the 16th VLDB Conference, Brisbane, Australia, pp. 264–277, August 1990.

  24. Naughton, J.F., Ramakrishnan, R., Sagiv, Y., and Ullman, J. D., “Efficient Evaluation of Righ-, Left-, and Multi-Linear Rules,” inProc. of the ACM SIGMOD Conference on Management of Data, Portland, Oregon, pp. 235–242, June 1989.

  25. Phipps, G., “Glue: A Deductive Database Programming Language”, inProc. of the NALCP'90 Workshop on Deductive Databases (Jan Chomicki, ed.), pp. 1–6, October 1990. Extended Abstract.

  26. Przymusinski, T. C., “Every Logic Program Has a Natural Stratification and an Iterated Fixed Point Model”, inProc. of the 8th ACM Symposium on Principles of Database Systems (PODS), Philadelphia, Pennsylvania, pp. 11–21, March 1989.

  27. Rosenthal, A., Heiler, S., Dayal, U., and Manola, F., “Traversal Recursion: A Practical Approach to Supporting Recursive Applications,” inProc. of the ACM SIGMOD Conference on Management of Data, Washington D. C., May 1986.

  28. Rohmer, J., Lescoeur, R., and Kerisit, J.-M., “The Alexander Method: A Technique for the Processing of Recursive Axioms in Deductive Databases”,New Generation Computing, 4, 3, pp. 273–285, 1986.

    Article  MATH  Google Scholar 

  29. Ross, K., “Modular Stratification and Magic Sets for DATALOG Programs with Negation,” inProc. of the 9th ACM Symposium on Principles of Database Systems (PODS), Nashville, Tennessy, pp. 161–171, April 1990.

  30. Ross, K. and Sagiv, Y., “Monotonic Aggregation in Deductive Databases,” inProc. of the 11th ACM Symposium on Principles of Database Systems (PODS), San Diego, California, June 1992. Also presented at the ILPS'91 Workshop on Deductive Databases.

  31. Ramakrishnan, R., Srivastava, D., and Sudarshan, S., “Controlling the Search in Bottom-Up Evaluation”, inProc. of the Joint Int. Conference and Symposium on Logic Programming, Washington D. C., pp. 273–287, November 1992.

  32. Ramakrishnan, R., Srivastava, D., Sudarshan, S., and Seshadri, P., “Implementation of the CORAL Deductive Database System,” inProc. of the ACM SIGMOD Conference on Management of Data, Washington D. C., May 1993.

  33. Seki, H., “On the Power of Alexander Templates”, inProc. of the 8th ACM Symposium on Principles of Database Systems (PODS), Philadelphia, Pennsylvania, pp. 150–159, March 1989.

  34. Seki, H. and Itoh, H., “A Query Evaluation Method for Stratified Programs under the Extended CWA,” inProc. of 5th Int. Conference and Symposium on Logic Programming (R. A. Kowalski and K. A. Bowen, eds.), Seattle, WA, pp. 195–211, August 1988.

  35. Sudarshan, S. and Ramakrishnan, R., “Aggregation and Relevance in Deductive Databases,” inProc. of the 17th VLDB Conference, Barcelona, Spain, September 1991.

  36. Sudarshan, S., Srivastava, D., Ramakrishnan, R., and Beeri, C., “Extending the Well-Founded and Valid Semantics for Aggregation”, inProc. of the International Logic Programming Symposium, Vancouver, British Columbia, October 1993.

  37. Sacca, D. and Zaniolo, C., “Magic Counting Methods”, inProc. of the ACM SIGMOD Conference on Management of Data, San Francisco, California, pp. 49–59, May 1987.

  38. Tamaki, H. and Sato, T., “OLD Resolution with Tabulation”, inProc. of the 3rd Int. Conference on Logic Programming, London, UK, pp. 84–98, June 1986.

  39. Tsur, S. and Zaniolo, C., “LDL: A Logic-Based Data-Language,” inProc. of the 12th VLDB Conference, Kyoto, Japan, pp. 33–41, August 1986.

  40. Ullman, J. D., “Bottom-Up Beats Top-Down for Datalog,” inProc. of the 8th ACM Symposium on Principles of Database Systems (PODS), Philadelphia, Pennsylvania, pp. 140–149, March 1989.

  41. Van Gelder, A., “The Well-Founded Semantics of Aggregation,” inProc. of the 11th ACM Symposium on Principles of Database Systems (PODS), San Diego, California, June 1992.

  42. Van Gelder, A., “Foundations of Aggregation in Deductive Databases”, inProc. of the 3rd International Conference on Deductive and Object-Oriented Databases (DOOD), Phoenix, Arizona, December 1993.

  43. Vieille, L., Bayer, P., Küchenhoff, V., and Lefebvre, A., “EKS-V1, A Short Overview,” inAAAI Workshop on Knowledge Base Management Systems (E. Mays, ed.), Boston, USA, July 1990.

  44. Vieille, L., “Recursive Axioms in Deductive Databases: The Query/SubQuery Approach”, inProc. 1st Int. Conference on Expert Database Systems (L. Kerschberg, ed.), Charleston, SC, USA, pp. 179–193, April 1986.

  45. Vieille, L., “From QSQ towards QoSaQ: Global Optimization of Recursive Queries,”, inProc. 2nd Int. Conference on Expert Database Systems (L. Kerschberg, ed.), Tysons Corner, Virginia, pp. 421–434, April 1988.

  46. Vieille, L., “Recursive Query Processing: The Power of Logic”,Theoretical Computer Science,69,1, December 1989.

Download references

Author information

Authors and Affiliations

Authors

Additional information

This paper is an extended version of the paper which appeared in the proceedings of the FGCS' 92 Conference.

This work was achieved while the author was at the European Computer-Industry Research Centre in Munich.

Dr. Alexandre Lefebvre: He is an engineer at Data and Knowledge Management, at Bull, France. Previously, he was a researcher at the European Computer-Industry Research Centre in Munich, Germany, and later a Research Fellow at Griffith University in Brisbane, Australia. He received a Ph.D. in computer science in 1991 from the University of Paris 5. He is a member of the ACM and the Association for Logic Programming. His professional interests include deductive and object-oriented databases.

About this article

Cite this article

Lefebvre, A. Towards an efficient evaluation of recursive aggregates in deductive databases. New Gener Comput 12, 131–160 (1994). https://doi.org/10.1007/BF03037339

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF03037339

Keywords

Navigation