Skip to main content
Log in

Rewriting Union Queries Using Views

  • Published:
Constraints Aims and scope Submit manuscript

Abstract

The problem of finding contained rewritings of queries using views is of great importance in mediated data integration systems. In this paper, we first present a general approach for finding contained rewritings of unions of conjunctive queries with arbitrary built-in predicates. Our approach is based on an improved method for testing conjunctive query containment in this context. Although conceptually simple, our approach generalizes previous methods for finding contained rewritings of conjunctive queries and is more powerful in the sense that many rewritings that can not be found using existing methods can be found by our approach. Furthermore, implication constraints (Zhang, X., & Ozsoyoglu, Z.M. (1997). Implication and referential constraints: A new formal resaoning. IEEE TKDE, 9(6):894–910, Now/Dec.) over the base relations can be easily handled. We then present a simplified approach which is less complete, but is much faster than the general approach, and it still finds maximum rewritings in several special cases. Our general approach finds more rewritings than previous algorithms such as the Bucket and the resolution-based algorithms. Our simplified approach generalizes the U-join and the MiniCon algorithms with no loss of efficiency.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Abiteboul, S., & Duschka, O. (1998). Complexity of answering queries using materalized views. In Proc. of PODS, pages 254–263.

  2. Afrati, F. N., Li, C., & Mitra, P. Answering queries using views with arithmetic comparisons. In Proceedings of PODS’02, Madison, Wisconsin, USA, pages 209–220 (3–5 June).

  3. Duschka, O. M., & Genesereth, M. R. (1997). Answering recursive queries using views. In Proc. 16th PODS, pages 109–116.

  4. Duschka, O. M., Genesereth, M., & Levy, A. (2000). Recursive query plans for data integration. Journal of Logic Programming, special issue on Logic Based Heterogeneous Information Systems, pages 778–784.

  5. Grant, J., & Minker, J. (2002). A logic-based approach to data intergration. Theory Pract. of Log. Prog. 2(3): 323–368.

    Google Scholar 

  6. Gryz, J. (1999). Query rewriting using views in the presence of functional and inclusion dependencies. Inf. Syst. 24(7): 597–612.

    Article  Google Scholar 

  7. Halevy, A. Y. (2001). Answering queries using views: A survey. VLDB J. 10(4): 270–294.

    Article  Google Scholar 

  8. Klug, A. C. (1988) On conjunctive queries containing inequalities. J. ACM 35(1): 146–160.

    Article  Google Scholar 

  9. Lassez, J. L., & McAloon, K. (1992). A canonical form for generalized linear constraints. J. Symb. Comput. 13(1): 1–24 (January).

    Article  Google Scholar 

  10. Levy, A., Rajaraman, A., & Ordille, J. J. (1996). Querying heterogeneous information sources using source descriptions. In Proc. of VLDB, pages 251–262.

  11. Maher, M. J. (1993). A logic programming view of CLP. In Proc. 10th International Conference on Logic Programming, pages 737–753.

  12. Mitra, P. (2001). An algorithm for answering queries efficiently using views. In Proc. of the 12th Australasian database conference.

  13. Pottinger, R., & Halevy, A. Y. (2001). Minicon: A scalable algorithm for answering queries using views. VLDB J. 10(2–3): 182–198.

    Google Scholar 

  14. Qian, X. (1996). Query folding. In Proc. of 12th ICDE, pages 48–55.

  15. Ullman, J. D. (1988). Principles of Database and Knowledge-Based Systems, vol. 1 & 2, 1st edition. Computer Science Press.

  16. Ullman, J. D. (2000). Information integration using logical views. Theor. Comput. Sci. 239(2): 189–210.

    Article  Google Scholar 

  17. Zhang, X., & Ozsoyoglu, Z. M. (1997). Implication and referential constraints: A new formal resaoning. IEEE TKDE 9(6): 894–910 (Nov/Dec).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to J. Wang.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Wang, J., Topor, R. & Maher, M. Rewriting Union Queries Using Views. Constraints 10, 219–251 (2005). https://doi.org/10.1007/s10601-005-2238-x

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10601-005-2238-x

Keywords

Navigation