skip to main content
research-article

Query from examples: an iterative, data-driven approach to query construction

Published:01 September 2015Publication History
Skip Abstract Section

Abstract

In this paper, we propose a new approach, called Query from Examples (QFE), to help non-expert database users construct SQL queries. Our approach, which is designed for users who might be unfamiliar with SQL, only requires that the user is able to determine whether a given output table is the result of his or her intended query on a given input database. To kick-start the construction of a target query Q, the user first provides a pair of inputs: a sample database D and an output table R which is the result of Q on D. As there will be many candidate queries that transform D to R, QFE winnows this collection by presenting the user with new database-result pairs that distinguish these candidates. Unlike previous approaches that use synthetic data for such pairs, QFE strives to make these distinguishing pairs as close to the original (D,R) pair as possible. By doing so, it seeks to minimize the effort needed by a user to determine if a new database-result pair is consistent with his or her desired query. We demonstrate the effectiveness and efficiency of our approach using real datasets from SQLShare, a cloud-based platform designed to help scientists utilize RDBMS technology for data analysis.

References

  1. Sloan digital sky survey. http://www.sdss.org/.Google ScholarGoogle Scholar
  2. J. Akbarnejad, G. Chatzopoulou, M. Eirinaki, S. Koshy, S. Mittal, D. On, N. Polyzotis, and J. S. V. Varman. SQL QueRIE recommendations. PVLDB, 3(1-2), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. B. Alexe, L. Chiticariu, R. J. Miller, and W. C. Tan. Muse: Mapping understanding and design by example. In ICDE, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. B. Alexe, L. Chiticariu, and W.-C. Tan. Spider: A schema mapping debugger. In VLDB, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. U. Çetintemel, M. Cherniack, J. DeBrabant, Y. Diao, K. Dimitriadou, A. Kalinin, O. Papaemmanouil, and S. B. Zdonik. Query steering for interactive data exploration. In CIDR, 2013.Google ScholarGoogle Scholar
  6. G. Chatzopoulou, M. Eirinaki, and N. Polyzotis. Query recommendations for interactive database exploration. In SSDBM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. G. Chatzopoulou et al. The QueRIE system for personalized query recommendations. IEEE Data Eng. Bull., 34(2), 2011.Google ScholarGoogle Scholar
  8. K. Dimitriadou, O. Papaemmanouil, and Y. Diao. Explore-by-example: An automatic query steering framework for interactive data exploration. In SIGMOD, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Giacometti, P. Marcel, E. Negre, and A. Soulet. Query recommendations for OLAP discovery driven analysis. In DOLAP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. B. Howe, G. Cole, N. Khoussainova, and L. Battle. Automatic starter queries for ad hoc databases. In SIGMOD(demo), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. B. Howe, G. Cole, E. Souroush, P. Koutris, A. Key, N. Khoussainova, and L. Battle. Database-as-a-service for long-tail science. In SSDBM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. N. Khoussainova et al. Snipsuggest: Context-aware autocompletion for SQL. PVLDB, 4(1), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. N. Khoussainova, Y. Kwon, W.-T. Liao, M. Balazinska, W. Gatterbauer, and D. Suciu. Session-based browsing for more effective query reuse. In SSDBM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. H. Li, C.-Y. Chan, and D. Maier. Query from examples: An iterative, data-driven approach to query construction. Technical report, National University of Singapore, August 2015. http://www.comp.nus.edu.sg/~chancy/techreport-august-2015-qfe.pdf.Google ScholarGoogle Scholar
  15. H. Mannila and K.-J. Räihä. Automatic generation of test data for relational queries. J. Comput. Syst. Sci., 38(2), 1989.Google ScholarGoogle ScholarCross RefCross Ref
  16. F. D. Marchi, S. Lopes, and J.-M. Petit. Efficient algorithms for mining inclusion dependencies. In EDBT, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. A. Nandi and H. V. Jagadish. Assisted querying using instant-response interfaces. In SIGMOD, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. C. Olston, B. Reed, U. Srivastava, R. Kumar, and A. Tomkins. Pig Latin: A not-so-foreign language for data processing. In SIGMOD, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. L. Qian, M. J. Cafarella, and H. V. Jagadish. Sample-driven schema mapping. In SIGMOD, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S. Shah et al. Generating test data for killing SQL mutants: A constraint-based approach. In ICDE, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Q. T. Tran, C.-Y. Chan, and S. Parthasarathy. Query reverse engineering. The VLDB Journal, 23(5), 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. K. Yessenov, S. Tulsiani, A. Menon, R. C. Miller, S. Gulwani, B. Lampson, and A. Kalai. A colorful approach to text processing by example. In UIST, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Zhang, H. Elmeleegy, C. M. Procopiuc, and D. Srivastava. Reverse engineering complex join queries. In SIGMOD, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Query from examples: an iterative, data-driven approach to query construction

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in

              Full Access

              • Published in

                cover image Proceedings of the VLDB Endowment
                Proceedings of the VLDB Endowment  Volume 8, Issue 13
                Proceedings of the 41st International Conference on Very Large Data Bases, Kohala Coast, Hawaii
                September 2015
                144 pages

                Publisher

                VLDB Endowment

                Publication History

                • Published: 1 September 2015
                Published in pvldb Volume 8, Issue 13

                Qualifiers

                • research-article

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader