Static checking of dynamically generated queries in database applications

Author:

Wassermann Gary1,Gould Carl1,Su Zhendong1,Devanbu Premkumar1

Affiliation:

1. University of California, Davis, CA

Abstract

Many data-intensive applications dynamically construct queries in response to client requests and execute them. Java servlets, for example, can create strings that represent SQL queries and then send the queries, using JDBC, to a database server for execution. The servlet programmer enjoys static checking via Java's strong type system. However, the Java type system does little to check for possible errors in the dynamically generated SQL query strings. Thus, a type error in a generated selection query (e.g., comparing a string attribute with an integer) can result in an SQL runtime exception. Currently, such defects must be rooted out through careful testing, or (worse) might be found by customers at runtime. In this article, we present a sound , static program analysis technique to verify that dynamically generated query strings do not contain type errors. We describe our analysis technique and provide soundness results for our static analysis algorithm. We also describe the details of a prototype tool based on the algorithm and present several illustrative defects found in senior software-engineering student-team projects, online tutorial examples, and a real-world purchase order system written by one of the authors.

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Reference34 articles.

1. Aho A. Sethi R. and Ullman J. 1986. Compilers Principles Techniques and Tools. Addison-Wesley Reading MA. Aho A. Sethi R. and Ullman J. 1986. Compilers Principles Techniques and Tools. Addison-Wesley Reading MA.

2. Subtyping recursive types

3. Andersen L. 1994. Program analysis and specialization for the C programming language. Ph.D. thesis DIKU University of Copenhagen. DIKU report 94/19. Andersen L. 1994. Program analysis and specialization for the C programming language. Ph.D. thesis DIKU University of Copenhagen. DIKU report 94/19.

4. Static validation of dynamically generated HTML

5. The project

Cited by 32 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3