skip to main content
10.1145/298514.298584acmconferencesArticle/Chapter ViewAbstractPublication PagespodsConference Proceedingsconference-collections
Article
Free Access

Magic conditions

Published:02 April 1990Publication History

ABSTRACT

Much recent work has focussed on the bottom-up evaluation of Datalog programs. One approach, called Magic-Sets, is based on rewriting a logic program so that bottom-up fixpoint evaluation of the program avoids generation of irrelevant facts ([BMSU86, BR87, Ram88]). It is widely believed that the principal application of the Magic-Sets technique is to restrict computation in recursive queries using equijoin predicates. We extend the Magic-Set transformation to use predicates other than equality (X > 10, for example). This Extended Magic-Set technique has practical utility in “real” relational databases, not only for recursive queries, but for non-recursive queries as well; in ([MFPR90]) we use the results in this paper and those in [MPR89] to define a magic-set transformation for relational databases supporting SQL and its extensions, going on to describe an implementation of magic in Starburst ([HFLP89]). We also give preliminary performance measurements.

In extending Magic-Sets, we describe a natural generalization of the common class of bound (b) and free (ƒ) adornments. We also present a formalism to compare adornment classes.

References

  1. BKMR89.Isaac Balbin, David B. Kemp, Krishnamurthy Meenakshi, and Kotagiri Ramamohanarao. Propagating Constraints in Recursive Deductive Databases. In North American Conference on Logic Programming (NACLP), Cleveland, Ohio, October 16-20 1989.Google ScholarGoogle Scholar
  2. BMSU86.Francois Bancilhon, David Maier, Yehoshua Sagiv, and Jeffrey D. Ullman. Magic Sets and other Strange Ways to Implement Logic Programs. In Proceedings of the Fifth Symposium on Principles of Database Systems (PODS), pages 1-15, ACM SIGACT- SIGMOD-SIGART, March 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. BR87.Catriel Beeri and Raghu Ramakrishnan. On the Power of Magic. In Proceedings of the Sixth Symposium on Principles of Database Systems (PODS), pages 269-283, ACM SIGACT-SIGMOD-SIGART, March 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. HFLP89.Laura M. Haas, J. C. Freytag, Guy M. Lohman, and Hamid Pirahesh. Extensible Query Processing in Starburst. In Proceedings of A CM SIGMOD 1989 International Conference on Management of Data, Portland, OR, pages 377-388, May 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. HP88.Waqar Hasan and Hamid Pirahesh. Query Rewrite Optimization in Starburst. Research Report, RJ 6337 (62349), IBM Research Division, Computer Science, Almaden Research Center, San Jose, California 95120- 6099, August 4 1988.Google ScholarGoogle Scholar
  6. ISO88.ISO_ANSI. Working Draft; Database Language SQL2. 1988.Google ScholarGoogle Scholar
  7. MPR89.Inderpal Singh Mumick, Hamid Pirahesh, and Raghu Ramakrishnan. Duplicates and Aggregates in Datalog. Research Report, IBM Reseaxch Division, Computer Science, Almaden Research Center, San Jose, California 95120-6099, December 1989.Google ScholarGoogle Scholar
  8. MFPR90.Inderpal Singh Mumick, Sheldon J. Finkelstein, IIamid Pirahesh, and Raghu Ramakrishnan. Magic is Relevant. Submitted to SIGMOD 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Mor88.Katherine A. Morris. An Algorithm for Ordering Subgoals in HAIL!. in Proceedings of the Seventh Symposium on Principles of Database Systems (PODS), pages 82-88, ACM SIGACT-SIGMOD-SIGART, March 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Ram88.Raghu Ramakrishnan. Magic Templates: A Spellbinding Approach to Logic Programs. In Robert A. Kowalski and Keneth A. Bowen, editors, Logic Programming: Proceedings of the Fifth International Conference and Symposium, Seattle, Vol 1, pages 140-159, MIT Press, Cambridge, MA, August 1988.Google ScholarGoogle Scholar
  11. Ull88.Jeffrey D. Ullman. Principles of Database and Knowledge-Base Systems, Volume 1. Computer Science Press, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Magic conditions

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Conferences
              PODS '90: Proceedings of the ninth ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems
              April 1990
              425 pages
              ISBN:0897913523
              DOI:10.1145/298514

              Copyright © 1990 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 2 April 1990

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • Article

              Acceptance Rates

              Overall Acceptance Rate642of2,707submissions,24%

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader