{"id":{"repo_id":"ecu","oai_identifier":"oai:thescholarship.ecu.edu:10342/6743"},"canonical_url":"https://search.ndltd.org/etd/ecu/oai:thescholarship.ecu.edu:10342/6743","repository":{"repo_id":"ecu","name":"East Carolina University","base_url":"https://thescholarship.ecu.edu/server/oai/request"},"display":{"title":"Modeling and Analysis of SQL Queries in PHP Systems","abstract":"PHP is a common language used for creating dynamic websites. These websites often include the use of databases to store data, with embedded SQL queries constructed within the PHP code and executed through the use of database access libraries. One of these libraries is the original MySQL library that, despite not being supported in current versions of PHP, is still widely used in existing PHP code. As a first step towards developing program comprehension and transformation tools for PHP systems that use this library, this research presents a query modeling tool that models embedded SQL queries in PHP systems and an empirical study conducted through analysis of these models. A main focus of this study was to establish common patterns developers use to construct SQL queries and to extract information about their occurrences in actual PHP systems. Using these patterns, the parts of queries that are generally static, and the parts that are often computed at runtime were extracted. For dynamically computed query parts, we also extracted data about which PHP language features are used to construct them. Finally, information about which clauses most often differ based on control flow was extracted as well as counts for how often each SQL query type and SQL clause is used in practice. We believe this information is useful for future work on building program understanding and transformation tools to renovate PHP code using database libraries.","abstract_html":"PHP is a common language used for creating dynamic websites. These websites often include the use of databases to store data, with embedded SQL queries constructed within the PHP code and executed through the use of database access libraries. One of these libraries is the original MySQL library that, despite not being supported in current versions of PHP, is still widely used in existing PHP code. As a first step towards developing program comprehension and transformation tools for PHP systems that use this library, this research presents a query modeling tool that models embedded SQL queries in PHP systems and an empirical study conducted through analysis of these models. A main focus of this study was to establish common patterns developers use to construct SQL queries and to extract information about their occurrences in actual PHP systems. Using these patterns, the parts of queries that are generally static, and the parts that are often computed at runtime were extracted. For dynamically computed query parts, we also extracted data about which PHP language features are used to construct them. Finally, information about which clauses most often differ based on control flow was extracted as well as counts for how often each SQL query type and SQL clause is used in practice. We believe this information is useful for future work on building program understanding and transformation tools to renovate PHP code using database libraries.","abstract_has_math":false,"creators":["Anderson, David"],"institution":"East Carolina University","degree_name":"M.S.","degree_level":"Masters","degree_discipline":"MS-Software Engineering","degree_department":"Computer Science","school":null,"contributors":[],"advisors":["Hills, Mark"],"committee_chairs":[],"committee_members":[],"year":2018,"date_issued":"2018-04-19","date_published":"2018-04-19","updated_at":"2026-11-19T08:17:07Z","subjects":["MySQL","Program Analysis","Database","Modeling","Empirical Software Engineering","Query languages (Computer science)","PHP (Computer program language)","SQL (Computer program language)"],"languages":["en"],"rights":["Open Access"],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://hdl.handle.net/10342/6743","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"https://hdl.handle.net/10342/6743","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","access_status":"open","embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Aecu%3Aoai%3Athescholarship.ecu.edu%3A10342%2F6743","prefix":"oai_dc"},"source_record":{"url":"https://thescholarship.ecu.edu/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Athescholarship.ecu.edu%3A10342%2F6743","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Hills, Mark"]},{"key":"dc:contributor.department","label":"Department","values":["Computer Science"]},{"key":"dc:creator","label":"Author","values":["Anderson, David"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2018-05-25T17:30:37Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2018-05-25T17:30:37Z"]},{"key":"dc:date.created","label":"Dc Date Created","values":["2018-05"]},{"key":"dc:date.issued","label":"Date","values":["2018-04-19"]},{"key":"dc:date.submitted","label":"Dc Date Submitted","values":["May 2018"]},{"key":"dc:date.updated","label":"Dc Date Updated","values":["2018-05-23T21:00:55Z"]},{"key":"dc:publisher","label":"Institution","values":["East Carolina University"]},{"key":"dc:type","label":"Dc Type","values":["Master's Thesis","text"]},{"key":"thesis:degree_department","label":"Department","values":["Computer Science"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["MS-Software Engineering"]},{"key":"thesis:degree_level","label":"Degree Level","values":["Masters"]},{"key":"thesis:degree_name","label":"Degree Name","values":["M.S."]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["East Carolina University"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["MySQL","Program Analysis","Database","Modeling","Empirical Software Engineering"]},{"key":"dc:subject.lcsh","label":"Dc Subject Lcsh","values":["Query languages (Computer science)","PHP (Computer program language)","SQL (Computer program language)"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]},{"key":"dc:rights.accessrights","label":"Access Rights","values":["Open Access"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.uri","label":"Identifier URI","values":["http://hdl.handle.net/10342/6743"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["PHP is a common language used for creating dynamic websites. These websites often include the use of databases to store data, with embedded SQL queries constructed within the PHP code and executed through the use of database access libraries. One of these libraries is the original MySQL library that, despite not being supported in current versions of PHP, is still widely used in existing PHP code. As a first step towards developing program comprehension and transformation tools for PHP systems that use this library, this research presents a query modeling tool that models embedded SQL queries in PHP systems and an empirical study conducted through analysis of these models. A main focus of this study was to establish common patterns developers use to construct SQL queries and to extract information about their occurrences in actual PHP systems. Using these patterns, the parts of queries that are generally static, and the parts that are often computed at runtime were extracted. For dynamically computed query parts, we also extracted data about which PHP language features are used to construct them. Finally, information about which clauses most often differ based on control flow was extracted as well as counts for how often each SQL query type and SQL clause is used in practice. We believe this information is useful for future work on building program understanding and transformation tools to renovate PHP code using database libraries."]},{"key":"dc:format.mimetype","label":"Dc Format Mimetype","values":["application/pdf"]},{"key":"dc:title","label":"Title","values":["Modeling and Analysis of SQL Queries in PHP Systems"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"dc:contributor.advisor":["Hills, Mark"],"dc:contributor.department":["Computer Science"],"dc:creator":["Anderson, David"],"dc:date.accessioned":["2018-05-25T17:30:37Z"],"dc:date.available":["2018-05-25T17:30:37Z"],"dc:date.created":["2018-05"],"dc:date.issued":["2018-04-19"],"dc:date.submitted":["May 2018"],"dc:date.updated":["2018-05-23T21:00:55Z"],"dc:description.abstract":["PHP is a common language used for creating dynamic websites. These websites often include the use of databases to store data, with embedded SQL queries constructed within the PHP code and executed through the use of database access libraries. One of these libraries is the original MySQL library that, despite not being supported in current versions of PHP, is still widely used in existing PHP code. As a first step towards developing program comprehension and transformation tools for PHP systems that use this library, this research presents a query modeling tool that models embedded SQL queries in PHP systems and an empirical study conducted through analysis of these models. A main focus of this study was to establish common patterns developers use to construct SQL queries and to extract information about their occurrences in actual PHP systems. Using these patterns, the parts of queries that are generally static, and the parts that are often computed at runtime were extracted. For dynamically computed query parts, we also extracted data about which PHP language features are used to construct them. Finally, information about which clauses most often differ based on control flow was extracted as well as counts for how often each SQL query type and SQL clause is used in practice. We believe this information is useful for future work on building program understanding and transformation tools to renovate PHP code using database libraries."],"dc:format.mimetype":["application/pdf"],"dc:identifier.uri":["http://hdl.handle.net/10342/6743"],"dc:language.iso":["en"],"dc:publisher":["East Carolina University"],"dc:rights.accessrights":["Open Access"],"dc:subject":["MySQL","Program Analysis","Database","Modeling","Empirical Software Engineering"],"dc:subject.lcsh":["Query languages (Computer science)","PHP (Computer program language)","SQL (Computer program language)"],"dc:title":["Modeling and Analysis of SQL Queries in PHP Systems"],"dc:type":["Master's Thesis","text"],"others:access_status":["open.access"],"thesis:degree_department":["Computer Science"],"thesis:degree_discipline":["MS-Software Engineering"],"thesis:degree_level":["Masters"],"thesis:degree_name":["M.S."],"thesis:institution_name":["East Carolina University"]},"updated_at":"2026-11-19T08:17:07Z"}