Skip to main content

A New Factoring Algorithm for Magic Predicates

  • Conference paper
  • First Online:
  • 140 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1538))

Abstract

The magic-sets method is a basic query optimization method in the deductive database systems. However, the original magic-sets method may generate large magic predicates for recursive queries. In this case, the evaluation of the magic predicates dominate the whole evaluation cost. Factorized magic sets can limit the sizes of generated magic predicates by splitting some magic predicates. However, it suffers from a new “over-splitting” problem. In this paper, we focus on a problem: what is the best splitting schema for a magic predicate, given a magic program. We propose a hypergraph model to represent the magic program as well as its naive evaluation procedure. An intuition is a magic predicate whose arguments belong to different connected components in infinite number of its generated graphs is considered to be a big one. It thus should be split. Based on the hypergraph model, we propose a new concept, called c-partition, as the best splitting of a magic predicate. Although we still do not know how to construct a c-partition, we define a serial of d[k]-partitions to approximate the c-partition. We prove that d[k]-partition is better then the existing splitting algorithm. Our method is a global splitting strategy for magic predicates, in the sense that it decides whether or not to split a magic predicate by considering the whole program

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

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bancilhon, F., Maier, D., Sagiv, Y., Ullman, J.D.: “Magic Set and Other Strange Ways to Implement Logic Programs”. Proc. ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems(PODS), (1986).

    Google Scholar 

  2. Siebes, A. etc.: “Deductive Databases: Challenges, Opportunities and Future Directions (panel discussion)” Proc. Int’l Workshop Logic in Databases, pp. 225–230 (1996)

    Google Scholar 

  3. Ramakrishnan, R., and Ullman, J.D.: “A Survey of Deductive Database Systems”, JLP Vol. 23, No. 2, 1995.

    Google Scholar 

  4. Minker, J.: “Logic and Databases: A 20 Year Retrospective” Proc. Int’l Workshop Logic in Databases, pp. 3–57 (1996)

    Google Scholar 

  5. Sagiv, Y.: “Is There Anything Better Than Magic?”, Proc. North American Conference on Logic Programming, pp. 235–254 (1990).

    Google Scholar 

  6. Seki, H: On the Power of Alexander Templates. Proc. ACM SIGACT-SIGMOD-SIGART Symp. Principles of Database Systems(PODS), pp. 150–159 (1989)

    Google Scholar 

  7. Sippu, S., Soisalon-Soininen, E.: “An Analysis of Magic Sets and Related Optimization Strategies for Logic Queries”, JACM Vol. 43, No. 6, pp. 1046–1088, (Nov 1996)

    Article  MATH  MathSciNet  Google Scholar 

  8. Ullman, J.D.: “Principles of Database and Knowledge-Based Systems”, Vol. 1 and 2, Computer Science Press, New York, (1989).

    Google Scholar 

  9. Ullman, J.D.: “Bottom-up Beats Top-down”, Proc. ACM SIGACT-SIGMOD-SIGART Symp. Principles of Database Systems(PODS), pp. 140–149 (1990)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1998 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Du, X., Liu, Z., Ishii, N. (1998). A New Factoring Algorithm for Magic Predicates. In: Hsiang, J., Ohori, A. (eds) Advances in Computing Science ASIAN 98. ASIAN 1998. Lecture Notes in Computer Science, vol 1538. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-49366-2_9

Download citation

  • DOI: https://doi.org/10.1007/3-540-49366-2_9

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-65388-2

  • Online ISBN: 978-3-540-49366-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics