Skip to main content

An Interactive Tool for Analyzing Embedded SQL Queries

  • Conference paper
Book cover Programming Languages and Systems (APLAS 2010)

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

Included in the following conference series:

Abstract

It is conventional for Java developers to access database engines through standard JDBC API which requires passing SQL queries in plain Java strings. This is referred to as embedding of SQL queries into Java. The strings are not checked at compile time, and errors in the queries (e.g. syntax errors or misspelled names) are usually detected only by testing. In this paper we describe a tool which statically analyzes SQL queries embedded into Java programs. It combines a sound syntactic analyzer with a testing facility which generates small tests to detect errors in individual queries and runs them on an actual database engine. The tool is implemented as a plug-in for Eclipse IDE and allows for interactive use in real-life projects.

This work was partially supported by the Estonian Science Foundation grant #8421, as well as the Software Technology and Applications Competence Center (STACC), and the European Regional Development Fund through the Estonian Center of Excellence in Computer Science, EXCS.

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. SeamlessSQL (2008), http://www.bugfreesql.com/

  2. Optim pureQuery Runtime (2009), http://www-01.ibm.com/software/data/optim/purequery-runtime/

  3. Bison parser generator (2010), http://www.gnu.org/software/bison/

  4. Eclipse IDE (2010), http://www.eclipse.org

  5. IntelliJ IDEA (2010), http://www.jetbrains.com/idea/

  6. Christensen, A.S., Møller, A., Schwartzbach, M.I.: Precise analysis of string expressions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 1–18. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  7. Doh, K.G., Kim, H., Schmidt, D.A.: Abstract parsing: Static analysis of dynamically generated string output using LR-parsing technology. In: Palsberg, J., Su, Z. (eds.) Static Analysis. LNCS, vol. 5673, pp. 256–272. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  8. Klein, G.: JFlex Scanner Generator (2009), http://www.jflex.org

  9. Kong, S., Choi, W., Yi, K.: Abstract parsing for two-staged languages with concatenation. In: Proceedings of the Eighth International Conference on Generative Programming and Component Engineering, GPCE 2009, pp. 109–116. ACM, New York (2009)

    Chapter  Google Scholar 

  10. Thiemann, P.: Grammar-based analysis of string expressions. In: Proceedings of the 2005 ACM SIGPLAN International Workshop on Types in languages Design and Implementation, TLDI 2005, pp. 59–70. ACM, New York (2005)

    Chapter  Google Scholar 

  11. Tomita, M.: Generalized L.R. Parsing. Kluwer Academic Publishers, Norwell (1991)

    Book  Google Scholar 

  12. Wassermann, G., Gould, C., Su, Z., Devanbu, P.: Static checking of dynamically generated queries in database applications. ACM Trans. Softw. Eng. Methodol. 16(4), 14 (2007)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Annamaa, A., Breslav, A., Kabanov, J., Vene, V. (2010). An Interactive Tool for Analyzing Embedded SQL Queries. In: Ueda, K. (eds) Programming Languages and Systems. APLAS 2010. Lecture Notes in Computer Science, vol 6461. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-17164-2_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-17164-2_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-17163-5

  • Online ISBN: 978-3-642-17164-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics