Skip to main content

Optimization of logic queries with MIN and MAX predicates

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 1495))

Abstract

We propose an algorithm for pushing min and max aggregates into recursive predicates, while preserving query equivalence under certain monotonicity constraints. The transformed query is often safe when the original one is not, and more efficient than the original query when this is safe.

The work of the first author has been supported by the project MURST 40 % ““.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. K. Apt, H. Blair, and A. Walker. Towards a theory of declarative programming. In Foundations of Deductive Databases and Logic Programming (Minker, ed.), 1988.

    Google Scholar 

  2. M.P. Consens and A.O. Mendelzon. Low complexity aggregation in graphlog and Datalog. Theoretical Computer Science, 1993.

    Google Scholar 

  3. S. W. Dietrich. Shortest Path by Approximation in Logic Programs. ACM Letters on Programming Languages and Systems Vol 1, No, 2, pages 119–137, June 1992,.

    Article  Google Scholar 

  4. S. J. Finkelstein, N. Mattos, I.S. Mumick and H. Pirahesh. Expressing Recursive Queries in SQL. ISO — IEC JTC1/SC21 WG3 DBL MCI Tec. Rep., March, 1996.

    Google Scholar 

  5. S. Ganguly, S. Greco, and C. Zaniolo. Extrema predicates in deductive databases. J. Computer and System Science, 1995.

    Google Scholar 

  6. M. Gelfond and V. Lifschitz. The stable model semantics of logic programming. In Proc. of the Fifth Intern. Conf. on Logic Programming, pages 1070–1080, 1988.

    Google Scholar 

  7. S. Greco, S. Ganguly, and C. Zaniolo. Greedy by Choice. Proc. Eleventh ACM PODS Conf., pages 109–118, 1991.

    Google Scholar 

  8. S. Greco, D. Saccà, and C. Zaniolo. Dynamic Programming optimization for Logic Programs with Aggregates. Proc. Int. Logic Progr. Symp., pages 109–118, 1993.

    Google Scholar 

  9. D. Kemp and P. Stuckey. Semantics of Logic Programs with Aggregates. In Proc. of the 1991 Intern. Symposium on Logic Programming, pages 387–341, 1991.

    Google Scholar 

  10. I.S. Mumick, H. Pirahesh, and R. Ramakrishnan. The magic of duplicates and aggregates. In Proc. 16th Conf. on Very Large Data Bases, pages 264–277, 1990.

    Google Scholar 

  11. I.S. Mumick, and O. Shmueli. How Expressive is Stratified Aggregation. In Annals of Mathematics and Artificial Intelligence, 1995.

    Google Scholar 

  12. H. Przymusinska and T.C. Przymusinski. Weakly perfect model semantics for logic programs. In Proc. Fifth Intern. Conf. on Logic Progr., pages 1106–1120, 1988.

    Google Scholar 

  13. K. Ross. A Procedural Semantics for the Well-Founded Negation in Logic Programs. In Proc. ACM Symp. on Principles of Database Systems, pages 22–33, 1989.

    Google Scholar 

  14. K. Ross and Y. Sagiv. Monotonic Aggregation in Deductive Databases. Proc. Eleventh ACM PODS Conf., 1992.

    Google Scholar 

  15. D. Saccà and C. Zaniolo. Stable models and non-determinism in logic programs with negation. In Proc. of the Ninth ACM PODS Conf., pages 205–217, 1990.

    Google Scholar 

  16. S. Sudarshan and R. Ramakrishnan. Aggregation and relevance in deductive databases. In Proc. of the 17th Conf. on Very Large Data Bases, 1991.

    Google Scholar 

  17. R. Ramakrishnan, D. Srivastava, and S. Sudarshan. CORAL: Control, Relations and Logic. In Proc. of Intl. Conf. on Very Large Data Bases, 1992.

    Google Scholar 

  18. S. Sudarshan, D. Srivastava, R. Ramakrishnan and C. Beeri, Extending Well-Founded and Valid Semantics for Aggregation, In Proc. of the Int. Logic Programming Symposium, pages 591–608, 1992.

    Google Scholar 

  19. J. Ullman. Principles of Data and Knowledge-Base Systems, volume 1 and 2. Computer Science Press, New York, 1988.

    Google Scholar 

  20. A. Van Gelder, K.A. Ross, and J.S. Schlipf. The well-founded semantics for general logic programs. Journal of ACM, 38(3):620–650, 1991.

    MATH  Google Scholar 

  21. A. Van Gelder. Foundation of Aggregation in Deductive Databases In Proceedings of the Third Int. Conf. on Deductive and 0-0 Databases, Phoenix, AZ, 1993.

    Google Scholar 

  22. C. Zaniolo, N. Arni, and K. Ong. Negation and aggregates in recursive rules: the LDL++ approach, In Proc. Int. Conf. od Deductive and Object Oriented Databases, pp. 204–221, 1993.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Troels Andreasen Henning Christiansen Henrik Legind Larsen

Rights and permissions

Reprints and permissions

Copyright information

© 1998 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Greco, S., Zaniolo, C., Ganguly, S. (1998). Optimization of logic queries with MIN and MAX predicates. In: Andreasen, T., Christiansen, H., Larsen, H.L. (eds) Flexible Query Answering Systems. FQAS 1998. Lecture Notes in Computer Science, vol 1495. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0056001

Download citation

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

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-65082-9

  • Online ISBN: 978-3-540-49655-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics