Skip to main content

Magic Sets and Their Application to Data Integration

  • Conference paper
Database Theory - ICDT 2005 (ICDT 2005)

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

Included in the following conference series:

Abstract

We propose a generalization of the well-known Magic Sets technique to DatalogĀ¬ programs with (possibly unstratified) negation under stable model semantics. Our technique produces a new program whose evaluation is generally more efficient (due to a smaller instantiation), while preserving soundness under cautious reasoning. Importantly, if the original program is consistent, then full query-equivalence is guaranteed for both brave and cautious reasoning, which turn out to be sound and complete.

In order to formally prove the correctness of our Magic Sets transformation, we introduce a novel notion of modularity for DatalogĀ¬ under the stable model semantics, which is relevant per se. We prove that a module can be evaluated independently from the rest of the program, while preserving soundness under cautious reasoning. For consistent programs, both soundness and completeness are guaranteed for brave reasoning and cautious reasoning as well. Our Magic Sets optimization constitutes an effective method for enhancing the performance of data-integration systems in which query-answering is carried out by means of cautious reasoning over DatalogĀ¬ programs. In fact, preliminary results of experiments in the EU project INFOMIX, show that Magic Sets are fundamental for the scalability of the system.

This work was supported by the European Commission under projects IST-2002-33570 INFOMIX, and IST-2001-37004 WASP.

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Ullman, J.D.: Principles of Database and Knowledge Base Systems. Computer Science Press, Rockville (1989)

    Google ScholarĀ 

  2. Gelfond, M., Lifschitz, V.: The Stable Model Semantics for Logic Programming. In: ICLP/SLP 1988, pp. 1070ā€“1080. MIT Press, Cambridge (1988)

    Google ScholarĀ 

  3. Bidoit, N., Froidevaux, C.: Negation by Default and Unstratifiable Logic Programs. Theoretical Computer ScienceĀ 78, 85ā€“112 (1991)

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  4. Dantsin, E., Eiter, T., Gottlob, G., Voronkov, A.: Complexity and Expressive Power of Logic Programming. ACM Computing SurveysĀ 33, 374ā€“425 (2001)

    ArticleĀ  Google ScholarĀ 

  5. Bidoit, N., Froidevaux, C.: General Logical Databases and Programs: Default Logic Semantics and Stratification. Information and ComputationĀ 91, 15ā€“54 (1991)

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  6. Marek, V.W., Truszczyński, M.: Autoepistemic Logic. JACMĀ 38, 588ā€“619 (1991)

    ArticleĀ  MATHĀ  Google ScholarĀ 

  7. Schlipf, J.: The Expressive Powers of Logic Programming Semantics. JCSSĀ 51, 64ā€“86 (1995); Abstract in Proc. PODS 1990, pp. 196ā€“204

    MATHĀ  MathSciNetĀ  Google ScholarĀ 

  8. Leone, N., Pfeifer, G., Faber, W., Eiter, T., Gottlob, G., Perri, S., Scarcello, F.: The DLV System for Knowledge Representation and Reasoning. In: ACM TOCL (2004) (to appear)

    Google ScholarĀ 

  9. NiemelƤ, I., Simons, P., SyrjƤnen, T.: Smodels: A System for Answer Set Programming. In: NMR 2000 (2000)

    Google ScholarĀ 

  10. Arenas, M., Bertossi, L.E., Chomicki, J.: Specifying and querying database repairs using logic programs with exceptions. In: Proc. of FQASĀ 2000, pp. 27ā€“41. Springer, Heidelberg (2000)

    Google ScholarĀ 

  11. Greco, G., Greco, S., Zumpano, E.: A logic programming approach to the integration, repairing and querying of inconsistent databases. In: Codognet, P. (ed.) ICLP 2001. LNCS, vol.Ā 2237, pp. 348ā€“364. Springer, Heidelberg (2001)

    ChapterĀ  Google ScholarĀ 

  12. BarcelĆ³, P., Bertossi, L.: Repairing databases with annotated predicate logic. In: Proc. the 10th Int. Workshop on Non-Monotonic Reasoning (NMR 2002), pp. 160ā€“170 (2002)

    Google ScholarĀ 

  13. CalƬ, A., Lembo, D., Rosati, R.: Query rewriting and answering under constraints in data integration systems. In: Proc. of IJCAI 2003, pp. 16ā€“21 (2003)

    Google ScholarĀ 

  14. Bravo, L., Bertossi, L.: Logic programming for consistently querying data integration systems. In: Proc. of IJCAI 2003, pp. 10ā€“15 (2003)

    Google ScholarĀ 

  15. Chomicki, J., Marcinkowski, J.: Minimal-Change Integrity Maintenance Using Tuple Deletions. Information and Computation (2004) (to appear)

    Google ScholarĀ 

  16. Lifschitz, V., Turner, H.: Splitting a Logic Program. In: Van Hentenryck, P. (ed.) ICLP 1994, pp. 23ā€“37. MIT Press, Cambridge (1994)

    Google ScholarĀ 

  17. Eiter, T., Gottlob, G., Mannila, H.: Disjunctive Datalog. ACM TODSĀ 22, 364ā€“418 (1997)

    ArticleĀ  Google ScholarĀ 

  18. Dung, P.M.: On the Relations between Stable and Well-Founded Semantics of Logic Programs. Theoretical Computer ScienceĀ 105, 7ā€“25 (1992)

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  19. Beeri, C., Ramakrishnan, R.: On the power of magic. JLPĀ 10, 255ā€“259 (1991)

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  20. CalƬ, A., Calvanese, D., De Giacomo, G., Lenzerini, M.: Data integration under integrity constraints. Information SystemsĀ 29, 147ā€“163 (2004)

    ArticleĀ  Google ScholarĀ 

  21. CalƬ, A., Lembo, D., Rosati, R.: On the decidability and complexity of query answering over inconsistent and incomplete databases. In: PODS 2003, pp. 260ā€“271 (2003)

    Google ScholarĀ 

  22. Bancilhon, F., Maier, D., Sagiv, Y., Ullman, J.D.: Magic Sets and Other Strange Ways to Implement Logic Programs. In: PODS 1986, pp. 1ā€“16 (1986)

    Google ScholarĀ 

  23. Mumick, I.S., Finkelstein, S.J., Pirahesh, H., Ramakrishnan, R.: Magic is relevant. In: SIGMOD Conference 1990, pp. 247ā€“258 (1990)

    Google ScholarĀ 

  24. Stuckey, P.J., Sudarshan, S.: Compiling query constraints. In: PODS 1994, pp. 56ā€“67. ACM Press, New York (1994)

    Google ScholarĀ 

  25. Ross, K.A.: Modular Stratification and Magic Sets for Datalog Programs with Negation. JACMĀ 41, 1216ā€“1266 (1994)

    ArticleĀ  MATHĀ  Google ScholarĀ 

  26. Kemp, D.B., Srivastava, D., Stuckey, P.J.: Bottom-up evaluation and query optimization of well-founded models. Theoretical Computer ScienceĀ 146, 145ā€“184 (1995)

    ArticleĀ  MATHĀ  MathSciNetĀ  Google ScholarĀ 

  27. Seshadri, P., Hellerstein, J.M., Pirahesh, H., Leung, T.Y.C., Ramakrishnan, R., Srivastava, D., Stuckey, P.J., Sudarshan, S.: Cost-based optimization for magic: Algebra and implementation. In: SIGMOD Conference 1996, pp. 435ā€“446. ACM Press, New York (1996)

    ChapterĀ  Google ScholarĀ 

  28. Behrend, A.: Soft stratification for magic set based query evaluation in deductive databases. In: PODS 2003, pp. 102ā€“110. ACM Press, New York (2003)

    ChapterĀ  Google ScholarĀ 

  29. Greco, S.: Binding Propagation Techniques for the Optimization of Bound Disjunctive Queries. IEEE TKDEĀ 15, 368ā€“385 (2003)

    Google ScholarĀ 

  30. Cumbo, C., Faber, W., Greco, G.: Enhancing the magic-set method for disjunctive datalog programs. In: Proc. of ICLP 2004, Saint-Malo, France (2004) (forthcoming)

    Google ScholarĀ 

  31. Greco, G., Greco, S., Trubitsyna, I., Zumpano, E.: Optimization of Bound Disjunctive Queries with Constraints. TPLP (to appear (CoRR report cs.LO/0406013))

    Google ScholarĀ 

  32. Eiter, T., Fink, M., Greco, G., Lembo, D.: Efficient evaluation of logic programs for querying data integration systems. In: Palamidessi, C. (ed.) ICLP 2003. LNCS, vol.Ā 2916, pp. 163ā€“177. Springer, Heidelberg (2003)

    ChapterĀ  Google ScholarĀ 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

Ā© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Faber, W., Greco, G., Leone, N. (2004). Magic Sets and Their Application to Data Integration. In: Eiter, T., Libkin, L. (eds) Database Theory - ICDT 2005. ICDT 2005. Lecture Notes in Computer Science, vol 3363. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30570-5_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30570-5_21

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-24288-8

  • Online ISBN: 978-3-540-30570-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics