Skip to main content

Optimizing Inequality Joins in Datalog with Approximated Constraint Propagation

  • Conference paper
  • 532 Accesses

Part of the Lecture Notes in Computer Science book series (LNPSE,volume 7149)

Abstract

Datalog systems evaluate joins over arithmetic (in)equalities as a naive generate-and-test of Cartesian products. We exploit aggregates in a source-to-source transformation to reduce the size of Cartesian products and to improve performance. Our approach approximates the well-known propagation technique from Constraint Programming.

Experimental evaluation shows good run time speed-ups on a range of non-recursive as well as recursive programs. Furthermore, our technique improves upon the previously reported in the literature constraint magic set transformation approach.

Keywords

  • Constraint Programming
  • Integrity Constraint
  • Engine Program
  • Recursive Program
  • Predicate Transformation

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (Canada)
  • 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. Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison-Wesley (1995)

    Google Scholar 

  2. Ashley-Rollman, M.P., De Rosa, M., Srinivasa, S.S., Pillai, P., Goldstein, S.C., Campbell, J.D.: Declarative Programming for Modular Robots. In: Workshop on Self-Reconfigurable Robots/Systems and Applications at IROS (2007)

    Google Scholar 

  3. Bravenboer, M., Smaragdakis, Y.: Exception Analysis and Points-To Analysis: Better Together. In: ISSTA, pp. 1–12 (2009)

    Google Scholar 

  4. Bravenboer, M., Smaragdakis, Y.: Strictly Declarative Specification of Sophisticated Points-To Analyses. In: OOPSLA, pp. 243–262 (2009)

    Google Scholar 

  5. Choi, C., Harvey, W., Lee, J., Stuckey, P.: Finite Domain Bounds Consistency Revisited. In: Sattar, A., Kang, B.-h. (eds.) AI 2006. LNCS (LNAI), vol. 4304, pp. 49–58. Springer, Heidelberg (2006)

    CrossRef  Google Scholar 

  6. Cui, B., Warren, D.S.: A System for Tabled Constraint Logic Programming. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 478–492. Springer, Heidelberg (2000)

    CrossRef  Google Scholar 

  7. Google’s Protocol Buffers, http://code.google.com/apis/protocolbuffers/

  8. Lam, M.S., Whaley, J., Livshits, V.B., Martin, M.C., Avots, D., Carbin, M., Unkel, C.: Context-sensitive program analysis as database queries. In: PODS, pp. 1–12 (2005)

    Google Scholar 

  9. Leone, N., Pfeifer, G., Faber, W., Eiter, T., Gottlob, G., Perri, S., Scarcello, F.: The DLV system for knowledge representation and reasoning. ACM Trans. Comput. Logic 7(3), 499–562 (2006)

    CrossRef  MathSciNet  MATH  Google Scholar 

  10. Li, N., Mitchell, J.C.: DATALOG with Constraints: A Foundation for Trust Management Languages. In: Dahl, V. (ed.) PADL 2003. LNCS, vol. 2562, pp. 58–73. Springer, Heidelberg (2002)

    CrossRef  Google Scholar 

  11. LogicBlox, http://logicblox.com/

  12. Loo, B.T., Condie, T., Garofalakis, M.N., Gay, D.E., Hellerstein, J.M., Maniatis, P., Ramakrishnan, R., Roscoe, T., Stoica, I.: Declarative networking: language, execution and optimization. In: SIGMOD, pp. 97–108 (2006)

    Google Scholar 

  13. Maier, D., Warren, D.S.: Computing with Logic: Logic Programming with Prolog. Benjamin/Cummings (1988)

    Google Scholar 

  14. Predictix, http://www.predictix.com/

  15. Rosenwald, J.: SWI-Prolog Google’s Protocol Buffers library, http://www.swi-prolog.org/pldoc/package/protobufs.html

  16. Semmle, http://semmle.com/

  17. Sereni, D., Avgustinov, P., de Moor, O.: Adding magic to an optimising Datalog compiler. In: SIGMOD, pp. 553–565 (2008)

    Google Scholar 

  18. Stuckey, P.J., Sudarshan, S.: Compiling query constraints (extended abstract). In: PODS, pp. 56–67 (1994)

    Google Scholar 

  19. White, W., Demers, A., Koch, C., Gehrke, J., Rajagopalan, R.: Scaling games to epic proportions. In: SIGMOD, pp. 31–42 (2007)

    Google Scholar 

  20. Wielemaker, J.: SWI-Prolog 5.10 Reference Manual (April 2010), http://www.swi-prolog.org

  21. Zook, D., Pasalic, E., Sarna-Starosta, B.: Typed Datalog. In: Gill, A., Swift, T. (eds.) PADL 2009. LNCS, vol. 5418, pp. 168–182. Springer, Heidelberg (2008)

    CrossRef  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Campagna, D., Sarna-Starosta, B., Schrijvers, T. (2012). Optimizing Inequality Joins in Datalog with Approximated Constraint Propagation. In: Russo, C., Zhou, NF. (eds) Practical Aspects of Declarative Languages. PADL 2012. Lecture Notes in Computer Science, vol 7149. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-27694-1_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-27694-1_9

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-27693-4

  • Online ISBN: 978-3-642-27694-1

  • eBook Packages: Computer ScienceComputer Science (R0)