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

Magic-sets transformation in nonrecursive systems

Published:01 July 1992Publication History

ABSTRACT

A nonrecursive system is any database system whose query language does not support recursive queries. Thus, many existing commerical SQL database systems are nonrecursive systems. Query optimization is an important issue for nonrecursive queries, and the magic-sets transformation has been shown to improve the performance of nonrecursive queries by many orders of magnitude [MFPR90]. It is thus important to use the magic-sets transformation in nonrecursive systems.

However, there is a problem. The magic-sets optimization can transform a nonrecursive query into a recursive query. Since a recursive query cannot be executed by a nonrecursive system, such a transformation is fatal. The magic-sets transformation cannot therefore be used in nonrecursive systems.

In this paper we present algorithms that achieve the optimization of the magic-sets transformation while guaranteeing that the transformed program will be nonrecursive whenever the original program is nonrecursive. The algorithms can be extended to the supplementary magic-sets transformation. We also define a new optimization technique for recursive and nonrecursive queries, covered subgoal elimination, that can eliminate subgoals from a rule, and can sometimes convert a recursive query into a nonrecursive one.

The algorithms presented in this paper are of practical relevance since they make it possible to incorporate the magic-sets transformation into existing commercial database systems.

References

  1. BR87.Catriel Beeri and B.aghu Ramakrishnan. On the power of magic. In Proceedings o} the Sizth Symposium on Principles of Database Systems (PODS), pages 269-283, San Diego, CA, March 1987. ACM SIGACT-SIGMOD- SIGART. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. GM92.Ashish Gupta and Inderpa} Singh Mumick. Magic-sets transformation in non-recursive systems. Technical report, Stanford University, Stanford, CA 94305, USA, 1992. To be published.Google ScholarGoogle Scholar
  3. ISO90.ISO_ANSI. Iso-ansi working draft: Database language sql2 and sql3; x3h2; iso/iec jtcl/sc21/wg3, 1990.Google ScholarGoogle Scholar
  4. MFPR90.Inderpal Singh Mumick, Sheldon J. Finkelstein, Hamid Pirahesh, and Raghu Ramakrishnan. Magic is relevant. In Proceeding# of A CM SIGMOD 1990 international Conference on Management o} Data, pages 247-258, Atlantic City, NJ, May 23-25 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. MPR90.Inderpal Singh Mumick, Hamid Pirahesh, and Raghu Ramakrishnan. The magic of duplicates and aggregates. In Proceedings oJ the Sixteenth International Conference on Very Large Databases (VLDB), pages 264- 277, Brisbane, Australia, August 13-16 t990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Mum91.Inderpal Singh Mumick. Query Optimization in Deductive and Relational Databases. PhD thesis, Stanford University, Stanford, CA 94305, USA, December 1991.Google ScholarGoogle Scholar
  7. Nau86.Jeffrey F. Naughton. Data independent recursion in deductive database#. In P#oeeedings of the Fifth Symposium on Principles of Database Systems (PODS), pages 267-279, Cambridge, MA, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. TS84.H. Tamald and T. Sato. Unfold/fold transformations in logic programs. In S. A. Tarnhnd, editor, Proc. of #he Second International Con. ference on Logzc Programming, pages 127- 138, Uppsala, Sweden, 1984.Google ScholarGoogle Scholar
  9. Ull89.Jeffrey D. Ultman. Principles of Database and Knowledge-Base Systems, Volumes I and #. Computer Science Press, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Magic-sets transformation in nonrecursive systems

          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 '92: Proceedings of the eleventh ACM SIGACT-SIGMOD-SIGART symposium on Principles of database systems
            July 1992
            392 pages
            ISBN:0897915194
            DOI:10.1145/137097

            Copyright © 1992 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: 1 July 1992

            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