An interactive tool for analyzing embedded SQL queries

  • Authors:
  • Aivar Annamaa;Andrey Breslav;Jevgeni Kabanov;Varmo Vene

  • Affiliations:
  • University of Tartu, Estonia;State University ITMO, St. Petersburg, Russia;University of Tartu, Estonia;University of Tartu, Estonia

  • Venue:
  • APLAS'10 Proceedings of the 8th Asian conference on Programming languages and systems
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

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.