An Interactive Tool for Analyzing Embedded SQL Queries
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.
KeywordsFalse Alarm Regular Language Java Code Lexical Analysis Database Engine
Unable to display preview. Download preview PDF.
- 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/
- 8.Klein, G.: JFlex Scanner Generator (2009), http://www.jflex.org