skip to main content
10.1145/1559795.1559828acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
research-article

Equivalence of nested queries with mixed semantics

Published:29 June 2009Publication History

ABSTRACT

We consider the problem of deciding query equivalence for a conjunctive language in which queries output complex objects composed from a mixture of nested, unordered collection types. Using an encoding of nested objects as flat relations, we translate the problem to deciding the equivalence between encodings output by relational conjunctive queries. This encoding equivalence cleanly unifies and generalizes previous results for deciding equivalence of conjunctive queries evaluated under various processing semantics. As part of our characterization of encoding equivalence, we define a normal form for encoding queries and contend that this normal form offers new insight into the fundamental principles governing the behaviour of nested aggregation.

References

  1. Serge Abiteboul, Richard Hull, and Victor Vianu. Foundations of Databases. Addison-Wesley, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Vasilis Aggelis and Stavros Cosmadakis. Optimization of nested SQL queries by tableau equivalence. In Proc. 7th DBPL, volume 1949 of LNCS. Springer, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Nicole Bidoit. The verso algebra or how to answer queries with fewer joins. J. Comput. Syst. Sci., 35(3):321--364, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Peter Buneman, Shamim A. Naqvi, Val Tannen, and Limsoon Wong. Principles of programming with complex objects and collection types. Theor. Comput. Sci., 149(1):3--48, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Ashok K. Chandra and Philip M. Merlin. Optimal implementation of conjunctive queries in relational data bases. In Proc. 9th ACM STOC, pages 77--90, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Surajit Chaudhuri and Moshe Y. Vardi. Optimization of real conjuctive queries. In Proc. 12th ACM PODS, pages 59--70, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Sara Cohen. Equivalence of queries combining set and bag-set semantics. In Proc. 25th ACM PODS, pages 70--79, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Sara Cohen, Werner Nutt, and Yehoshua Sagiv. Deciding equivalences among conjunctive aggregate queries. J. ACM, 54(2):5, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Sara Cohen, Yehoshua Sagiv, and Werner Nutt. Equivalences among aggregate queries with negation. ACM Trans. Comput. Logic, 6(2):328--360, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Umeshwar Dayal. Of nests and trees: A unified approach to processing queries that contain nested subqueries, aggregates, and quantifiers. In Proc. 13th VLDB, pages 197--208, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. David DeHaan. Equivalence of nested queries with mixed semantics. Technical Report CS-2009-12, D.R. Cheriton School of Computer Science, University of Waterloo, 2009. Available at http://www.cs.uwaterloo.ca/research/tr/2009/.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. David DeHaan, Per-Ake Larson, and Jingren Zhou. Stacked indexed views in Microsoft SQL Server. In Proc. ACM SIGMOD, pages 179--190, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Xin Dong, Alon Y. Halevy, and Igor Tatarinov. Containment of nested XML queries. In Proc. 30th VLDB, pages 132--143, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Hector Garcia-Molina, Jeffrey D. Ullman, and Jennifer Widom. Database Systems: The Complete Book. Prentice Hall, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Stephane Grumbach, Maurizio Rafanelli, and Leonardo Tininini. Querying aggregate data. In Proc. 18th ACM PODS, pages 174--184, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Ashish Gupta, Venky Harinarayan, and Dallan Quass. Aggregate-query processing in data warehousing environments. In Proc. 21st VLDB, pages 358--369, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Ashish Gupta, Yehoshua Sagiv, Jeffrey D. Ullman, and Jennifer Widom. Constraint checking with partial information. In Proc. 13th ACM PODS, pages 45--55, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Yannis E. Ioannidis and Raghu Ramakrishnan. Containment of conjunctive queries: Beyond relations as sets. ACM Trans. Database Syst., 20(3):288--324, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. D.S. Johnson and A. Klug. Testing containment of conjunctive queries under functional and inclusion dependencies. J. Comput. Syst. Sci., 28(1):167--189, 1984.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Won Kim. On optimizing an SQL-like nested query. ACM Trans. Database Syst., 7(3):443--469, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Anthony Klug. On conjunctive queries containing inequalities. J. ACM, 35(1):146--160, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Alon Y. Levy, Alberto O. Mendelzon, Yehoshua Sagiv, and Divesh Srivastava. Answering queries using views (extended abstract). In Proc. 14th ACM PODS, pages 95--104, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Alon Y. Levy and Inderpal Singh Mumick. Reasoning with aggregation constraints. In Proc. 5th EDBT, volume 1057 of LNCS, pages 514--534. Springer, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Alon Y. Levy, Inderpal Singh Mumick, and Yehoshua Sagiv. Query optimization by predicate move-around. In Proc. 20th VLDB, pages 96--107, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Alon Y. Levy and Dan Suciu. Deciding containment for queries with complex objects (extended abstract). In Proc. 16th ACM PODS, pages 20--31, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Leonid Libkin and Limsoon Wong. New techniques for studying set languages, bag languages and aggregate functions. In Proc. 13th ACM PODS, pages 155--166, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Hong-Cheu Liu and Jeffery X. Yu. Algebraic equivalences of nested relational operators. Inf. Syst., 30(3):167--204, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Sergey Melnik, Atul Adya, and Philip A. Bernstein. Compiling mappings to bridge applications and databases. ACM Trans. Database Syst., 33(4):1--50, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Inderpal Singh Mumick, Sheldon J. Finkelstein, Hamid Pirahesh, and Raghu Ramakrishnan. Magic conditions. In Proc. 9th ACM PODS, pages 314--330, 1990 Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. G. Ozsoyoglu, Z.M. Ozsoyoglu, and V. Matos. Extending relational algebra and relational calculus with set-valued attributes and aggregate functions. ACM Trans. Database Syst., 12(4):566--592, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Shariq Rizvi, Alberto Mendelzon, S. Sudarshan, and Prasan Roy. Extending query rewriting techniques for fine-grained access control. In Proc. ACM SIGMOD, pages 551--562, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Kenneth A. Ross, Divesh Srivastava, Peter J. Stuckey, and S. Sudarshan. Foundations of aggregation constraints. Theor. Comput. Sci., 193(1-2):149--179, February 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Yehoshua Sagiv and Mihalis Yannakakis. Equivalences among relational expressions with the union and difference operators. J. ACM, 27(4):633--655, 1980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Marc H. Scholl. Theoretical foundation of algebraic optimization utilizing unnormalized relations. In Proc. ICDT, volume 243 of LNCS, pages 380--396. Springer, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Divesh Srivastava, Shaul Dar, H.V. Jagadish, and Alon Y. Levy. Answering queries with aggregation using views. In Proc. 22nd VLDB, pages 318--329, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Stan J. Thomas and Patrick C. Fischer. Nested relational structures. In Paris C. Kanellakis, editor, Advances in Computing Research: The Theory of Databases, pages 269--307. JAI Press, 1986.Google ScholarGoogle Scholar
  37. Frank Wm. Tompa and Jose A. Blakeley. Maintaining materialized views without accessing base data. Inf. Syst., 13(4):393--406, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Jan Van den Bussche, Dirk Van Gucht, and Stijn Vansummeren. Well-definedness and semantic type-checking for the nested relational calculus. Theor. Comput. Sci., 371(3):183--199, March 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. R. van der Meyden. The complexity of querying indefinite data about linearly ordered domains. In Proc. 11th ACM PODS, pages 331--345, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Weipeng P. Yan and Per-Ake Larson. Performing group-by before join. In Proc. 10th ICDE, pages 89--100, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Markos Zaharioudakis, Roberta Cochrane, George Lapis, Hamid Pirahesh, and Monica Urata. Answering complex SQL queries using automatic summary tables. In Proc. ACM SIGMOD, pages 105--116, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Equivalence of nested queries with mixed semantics

          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
          • Published in

            cover image ACM Conferences
            PODS '09: Proceedings of the twenty-eighth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems
            June 2009
            298 pages
            ISBN:9781605585536
            DOI:10.1145/1559795
            • General Chair:
            • Jan Paredaens,
            • Program Chair:
            • Jianwen Su

            Copyright © 2009 ACM

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 29 June 2009

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            Overall Acceptance Rate476of1,835submissions,26%

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!