首页> 外文期刊>ACM transactions on software engineering and methodology >Static Checking of Dynamically Generated Queries in Database Applications
【24h】

Static Checking of Dynamically Generated Queries in Database Applications

机译:数据库应用程序中动态生成的查询的静态检查

获取原文
获取原文并翻译 | 示例

摘要

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.
机译:许多数据密集型应用程序可动态构造查询以响应客户端请求并执行它们。例如,Java servlet可以创建表示SQL查询的字符串,然后使用JDBC将查询发送到数据库服务器以执行。 Servlet程序员通过Java的强类型系统享受静态检查。但是,Java类型系统几乎无法检查动态生成的SQL查询字符串中是否存在错误。因此,所生成的选择查询中的类型错误(例如,将字符串属性与整数进行比较)会导致SQL运行时异常。当前,此类缺陷必须通过仔细的测试消除,否则(差)的结果可能会在运行时被客户发现。在本文中,我们提出了一种可靠的静态程序分析技术,以验证动态生成的查询字符串不包含类型错误。我们描述了我们的分析技术,并为我们的静态分析算法提供了可靠的结果。我们还描述了基于该算法的原型工具的详细信息,并介绍了在其中一位作者编写的高级软件工程学生团队项目,在线教程示例以及实际购买订单系统中发现的一些说明性缺陷。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号