Extraction of Embedded Queries via Static Analysis of Host Code

  • Petros ManousisEmail author
  • Apostolos Zarras
  • Panos Vassiliadis
  • George Papastefanatos
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10253)


Correctly identifying the embedded queries within the source code of an information system is a significant aid to developers and administrators, as it can facilitate the visualization of a map of the information system, the identification of areas affected by schema evolution, code migration, and the planning of the joint maintenance of code and data. In this paper, we provide a solution to the problem of identifying the location and semantics of embedded queries with a generic, language-independent method that identifies the embedded queries of a data-intensive ecosystem, regardless of the programming style and the host language, and represents them in a universal, also language-independent manner that facilitates the aforementioned maintenance, evolution and migration tasks with minimal user effort and significant effectiveness.


Reverse engineering of database queries Query extraction Embedded queries 


  1. 1.
    Maule, A., Emmerich, W., Rosenblum, D.S.: Impact analysis of database schema changes. In: Proceedings of the 30th International Conference on Software Engineering (ICSE), pp. 451–460 (2008)Google Scholar
  2. 2.
    Manousis, P., Vassiliadis, P., Papastefanatos, G.: Automating the adaptation of evolving data-intensive ecosystems. In: Ng, W., Storey, V.C., Trujillo, J.C. (eds.) ER 2013. LNCS, vol. 8217, pp. 182–196. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-41924-9_17 CrossRefGoogle Scholar
  3. 3.
    Christensen, A.S., Møller, A., Schwartzbach, M.I.: Precise analysis of string expressions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 1–18. Springer, Heidelberg (2003). doi: 10.1007/3-540-44898-5_1 CrossRefGoogle Scholar
  4. 4.
    Gallagher, K., Binkley, D.: Program slicing. In: Frontiers of Software Maintenance, FoSM 2008, pp. 58–67. IEEE (2008)Google Scholar
  5. 5.
    Cleve, A., Henrard, J., Hainaut, J.: Data reverse engineering using system dependency graphs. In: Proceedings of the 13th Working Conference on Reverse Engineering (WCRE), pp. 157–166 (2006)Google Scholar
  6. 6.
    Gould, C., Su, Z., Devanbu, P.T.: Static checking of dynamically generated queries in database applications. In: Proceedings of the 26th International Conference on Software Engineering (ICSE), pp. 645–654 (2004)Google Scholar
  7. 7.
    Wassermann, G., Gould, C., Su, Z., Devanbu, P.T.: Static checking of dynamically generated queries in database applications. ACM Trans. Softw. Eng. Methodol. 16(4), 14 (2007)CrossRefGoogle Scholar
  8. 8.
    Annamaa, A., Breslav, A., Kabanov, J., Vene, V.: An interactive tool for analyzing embedded SQL queries. In: Ueda, K. (ed.) APLAS 2010. LNCS, vol. 6461, pp. 131–138. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-17164-2_10 CrossRefGoogle Scholar
  9. 9.
    van den Brink, H., van der Leek, R., Visser, J.: Quality assessment for embedded SQL. In: Proceedings of the 7th IEEE International Conference on Source Code Analysis and Manipulation (SCAM), pp. 163–170 (2007)Google Scholar
  10. 10.
    Ngo, M.N., Tan, H.B.K.: Applying static analysis for automated extraction of database interactions in web applications. Inf. Softw. Technol. 50(3), 160–175 (2008)CrossRefGoogle Scholar
  11. 11.
    Nagy, C., Meurice, L., Cleve, A.: Where was this SQL query executed? A static concept location approach. In: 22nd IEEE International Conference on Software Analysis, Evolution, and Reengineering (SANER), pp. 580–584 (2015)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Petros Manousis
    • 1
    Email author
  • Apostolos Zarras
    • 1
  • Panos Vassiliadis
    • 1
  • George Papastefanatos
    • 2
  1. 1.Department of Computer Science and EngineeringUniversity of Ioannina (Hellas)IoanninaGreece
  2. 2.ATHENA Research and Innovation CenterIMISAthensGreece

Personalised recommendations