Loop Elimination for Database Updates

  • Vadim Savenkov
  • Reinhard Pichler
  • Christoph Koch
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7968)

Abstract

The additional expressive power of procedural extensions of query and update languages come at the expense of trading the efficient set-at-a-time processing of database engines for the much less efficient tuple-at-a-time processing of a procedural language. In this work, we consider the problem of rewriting for-loops with update statements into sequences of updates which do not use loops or cursors and which simultaneously carry out the action of several loop iterations in a set-at-a-time manner. We identify idempotence as the crucial condition for allowing such a rewriting. We formulate concrete rewrite rules for single updates in a loop and extend them to sequences of updates in a loop.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Antova, L., Koch, C.: On APIs for probabilistic databases. In: QDB/MUD, pp. 41–56 (2008)Google Scholar
  2. 2.
    de Kruijf, M.A., Sankaralingam, K., Jha, S.: Static analysis and compiler design for idempotent processing. SIGPLAN Not. 47(6), 475–486 (2012)Google Scholar
  3. 3.
    Gluche, D., Grust, T., Mainberger, C., Scholl, M.H.: Incremental updates for materialized OQL views. In: Bry, F. (ed.) DOOD 1997. LNCS, vol. 1341, pp. 52–66. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  4. 4.
    Gupta, A., Mumick, I.S. (eds.): Materialized views: techniques, implementations, and applications. MIT Press, Cambridge (1999)Google Scholar
  5. 5.
    Lieuwen, D.F., DeWitt, D.J.: A transformation-based approach to optimizing loops in database programming languages. SIGMOD Rec. 21(2), 91–100 (1992)CrossRefGoogle Scholar
  6. 6.
    Ramalingam, G., Vaswani, K.: Fault tolerance via idempotence. In: Proc. of POPL 2013, pp. 249–262. ACM, New York (2013)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Vadim Savenkov
    • 1
  • Reinhard Pichler
    • 1
  • Christoph Koch
    • 2
  1. 1.Vienna University of TechnologyAustria
  2. 2.École Polytechnique Fédérale de LausanneSwitzerland

Personalised recommendations