• DocumentCode
    660556
  • Title

    Automatically synthesizing SQL queries from input-output examples

  • Author

    Sai Zhang ; Yuyin Sun

  • Author_Institution
    Comput. Sci. & Eng., Univ. of Washington, Seattle, WA, USA
  • fYear
    2013
  • fDate
    11-15 Nov. 2013
  • Firstpage
    224
  • Lastpage
    234
  • Abstract
    Many computer end-users, such as research scientists and business analysts, need to frequently query a database, yet lack enough programming knowledge to write a correct SQL query. To alleviate this problem, we present a programming by example technique (and its tool implementation, called SQLSynthesizer) to help end-users automate such query tasks. SQLSynthesizer takes from users an example input and output of how the database should be queried, and then synthesizes a SQL query that reproduces the example output from the example input. If the synthesized SQL query is applied to another, potentially larger, database with a similar schema, the synthesized SQL query produces a corresponding result that is similar to the example output. We evaluated SQLSynthesizer on 23 exercises from a classic database textbook and 5 forum questions about writing SQL queries. SQLSynthesizer synthesized correct answers for 15 textbook exercises and all 5 forum questions, and it did so from relatively small examples.
  • Keywords
    SQL; query processing; SQL query writing; SQLSynthesizer tool; automatic SQL query synthesis; computer end-users; database query; database textbook exercises; forum questions; input-output examples; programming-by-example technique; Aggregates; Databases; Graphical user interfaces; Skeleton; Standards; Syntactics; Writing;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Automated Software Engineering (ASE), 2013 IEEE/ACM 28th International Conference on
  • Conference_Location
    Silicon Valley, CA
  • Type

    conf

  • DOI
    10.1109/ASE.2013.6693082
  • Filename
    6693082