{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,29]],"date-time":"2026-07-29T02:20:27Z","timestamp":1785291627408,"version":"3.55.0"},"reference-count":33,"publisher":"Association for Computing Machinery (ACM)","issue":"4","license":[{"start":{"date-parts":[[2007,9,1]],"date-time":"2007-09-01T00:00:00Z","timestamp":1188604800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Softw. Eng. Methodol."],"published-print":{"date-parts":[[2007,9]]},"abstract":"<jats:p>\n            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\n            <jats:italic>sound<\/jats:italic>\n            ,\n            <jats:italic>static<\/jats:italic>\n            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.\n          <\/jats:p>","DOI":"10.1145\/1276933.1276935","type":"journal-article","created":{"date-parts":[[2007,9,26]],"date-time":"2007-09-26T17:18:32Z","timestamp":1190827112000},"page":"14","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":51,"title":["Static checking of dynamically generated queries in database applications"],"prefix":"10.1145","volume":"16","author":[{"given":"Gary","family":"Wassermann","sequence":"first","affiliation":[{"name":"University of California, Davis, CA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Carl","family":"Gould","sequence":"additional","affiliation":[{"name":"University of California, Davis, CA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Zhendong","family":"Su","sequence":"additional","affiliation":[{"name":"University of California, Davis, CA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Premkumar","family":"Devanbu","sequence":"additional","affiliation":[{"name":"University of California, Davis, CA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2007,9]]},"reference":[{"key":"e_1_2_1_1_1","unstructured":"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."},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/99583.99600"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/379605.379657"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/514183.514184"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1007\/11924661_23"},{"key":"e_1_2_1_7_1","volume-title":"Proceedings of the 10th International Static Analysis Symposium","author":"Christensen A., M","unstructured":"Christensen , A., M &oslah;ller, A., and Schwartzbach , M . 2003. Precise analysis of string expressions . In Proceedings of the 10th International Static Analysis Symposium ( San Diego, CA). Springer-Verlag, New York, 1--18. Christensen, A., M&oslah;ller, A., and Schwartzbach, M. 2003. Precise analysis of string expressions. In Proceedings of the 10th International Static Analysis Symposium (San Diego, CA). Springer-Verlag, New York, 1--18."},{"key":"e_1_2_1_8_1","unstructured":"Cook W. R. and Ibrahim A. H. 2005. Programming languages &amp; databases: What's the problem&quest;&quest; url: http:\/\/www.cs.utexas.edu\/~wcook\/Drafts\/2005\/PLDBProblem.pdf.  Cook W. R. and Ibrahim A. H. 2005. Programming languages &amp; databases: What's the problem&quest;&quest; url: http:\/\/www.cs.utexas.edu\/~wcook\/Drafts\/2005\/PLDBProblem.pdf."},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/1062455.1062488"},{"key":"e_1_2_1_10_1","unstructured":"Guyot J. 1998. BNF index of SQL for Oracle 7. Available at http:\/\/cui.unige.ch\/db-research\/Enseignement\/analyseinfo\/SQL7\/.  Guyot J. 1998. BNF index of SQL for Oracle 7. Available at http:\/\/cui.unige.ch\/db-research\/Enseignement\/analyseinfo\/SQL7\/."},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/1083246.1083250"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/378795.378855"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/568438.568455"},{"key":"e_1_2_1_14_1","unstructured":"JBoss. 2006. Hibernate. url: http:\/\/www.hibernate.org\/.  JBoss. 2006. Hibernate. url: http:\/\/www.hibernate.org\/."},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/321921.321938"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/940071.940086"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/512927.512945"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/319838.319859"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/258993.259006"},{"key":"e_1_2_1_20_1","unstructured":"Microsoft. 2004. ADO.NET. url: http:\/\/msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/dnanchor\/html\/adonetanchor.asp.  Microsoft. 2004. ADO.NET. url: http:\/\/msdn.microsoft.com\/library\/default.asp?url=\/library\/en-us\/dnanchor\/html\/adonetanchor.asp."},{"key":"e_1_2_1_21_1","unstructured":"Microsoft. 2005. LINQ Project. url: http:\/\/msdn.microsoft.com\/netframework\/future\/linq\/.  Microsoft. 2005. LINQ Project. url: http:\/\/msdn.microsoft.com\/netframework\/future\/linq\/."},{"key":"e_1_2_1_22_1","unstructured":"Oracle. 2006. Oracle TopLink. url: http:\/\/www.oracle.com\/technology\/products\/ias\/toplink\/index.html.  Oracle. 2006. Oracle TopLink. url: http:\/\/www.oracle.com\/technology\/products\/ias\/toplink\/index.html."},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/199448.199462"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/325694.325733"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/53990.54007"},{"key":"e_1_2_1_26_1","unstructured":"SQLJ. 1997. See http:\/\/www.sqlj.org.  SQLJ. 1997. See http:\/\/www.sqlj.org."},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/325694.325706"},{"key":"e_1_2_1_28_1","unstructured":"Sun. 2003. Java Data Objects (JDO). url: http:\/\/java.sun.com\/products\/jdo\/.   Sun. 2003. Java Data Objects (JDO). url: http:\/\/java.sun.com\/products\/jdo\/."},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/258993.259019"},{"key":"e_1_2_1_30_1","volume-title":"Proceedings of the IBM Centre for Advanced Studies Conference, CASCON'99 (Mississauga, Ont., Canada). IBM","author":"Vallee-Rai R.","unstructured":"Vallee-Rai , R. , Hendren , L. , Sundaresan , V. , Lam , P. , Gagnon , E. , and Co , P . 1999. Soot--a Java optimization framework . In Proceedings of the IBM Centre for Advanced Studies Conference, CASCON'99 (Mississauga, Ont., Canada). IBM , New York. Vallee-Rai, R., Hendren, L., Sundaresan, V., Lam, P., Gagnon, E., and Co, P. 1999. Soot--a Java optimization framework. In Proceedings of the IBM Centre for Advanced Studies Conference, CASCON'99 (Mississauga, Ont., Canada). IBM, New York."},{"key":"e_1_2_1_31_1","volume-title":"Building Secure Software: How to Avoid Security Problems the Right Way","author":"Viega J.","unstructured":"Viega , J. , and McGraw , G. 2001. Building Secure Software: How to Avoid Security Problems the Right Way . Addison Wesley , Boston, MA . Viega, J., and McGraw, G. 2001. Building Secure Software: How to Avoid Security Problems the Right Way. Addison Wesley, Boston, MA."},{"key":"e_1_2_1_32_1","volume-title":"Proceedings of the 3rd FSE Workshop on the Specification and Verification of Component Based Systems (SAVCBS 2004)","author":"Wassermann G.","unstructured":"Wassermann , G. , and Su , Z . 2004. An analysis framework for security in Web applications . In Proceedings of the 3rd FSE Workshop on the Specification and Verification of Component Based Systems (SAVCBS 2004) (Newport Beach, CA). ACM, New York, 70--78. Wassermann, G., and Su, Z. 2004. An analysis framework for security in Web applications. In Proceedings of the 3rd FSE Workshop on the Specification and Verification of Component Based Systems (SAVCBS 2004) (Newport Beach, CA). ACM, New York, 70--78."},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/155090.155105"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF01209711"}],"container-title":["ACM Transactions on Software Engineering and Methodology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/1276933.1276935","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/1276933.1276935","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T14:58:04Z","timestamp":1750258684000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/1276933.1276935"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2007,9]]},"references-count":33,"journal-issue":{"issue":"4","published-print":{"date-parts":[[2007,9]]}},"alternative-id":["10.1145\/1276933.1276935"],"URL":"https:\/\/doi.org\/10.1145\/1276933.1276935","relation":{},"ISSN":["1049-331X","1557-7392"],"issn-type":[{"value":"1049-331X","type":"print"},{"value":"1557-7392","type":"electronic"}],"subject":[],"published":{"date-parts":[[2007,9]]},"assertion":[{"value":"2007-09-01","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}