Rewriting Queries Using Views with Access Patterns Under Integrity Constraints

  • Alin Deutsch
  • Bertram Ludäscher
  • Alan Nash
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3363)


We study the problem of rewriting queries using views in the presence of access patterns, integrity constraints, disjunction, and negation. We provide asymptotically optimal algorithms for finding minimal containing and maximal contained rewritings and for deciding whether an exact rewriting exists. We show that rewriting queries using views in this case reduces (a) to rewriting queries with access patterns and constraints without views and also (b) to rewriting queries using views under constraints without access patterns. We show how to solve (a) directly and how to reduce (b) to rewriting queries under constraints only (semantic optimization). These reductions provide two separate routes to a unified solution for all three problems, based on an extension of the relational chase theory to queries and constraints with disjunction and negation. We also handle equality and arithmetic comparisons.


Access Pattern Integrity Constraint Relation Symbol Answerable Part Conjunctive Query 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abiteboul, S., Hull, R., Vianu, V.: Foundations of Databases. Addison-Wesley, Reading (1995)zbMATHGoogle Scholar
  2. 2.
    Chandra, A.K., Merlin, P.M.: Optimal implementation of conjunctive queries in relational data bases. In: ACM Symposium on Theory of Computing (STOC), pp. 77–90 (1977)Google Scholar
  3. 3.
    Deutsch, A., Ludäscher, B., Nash, A.: Rewriting queries using views with access patterns under integrity constraints. Technical report, Department of Computer Science and Engineering, UCSD (2004); Extended version of this paper,
  4. 4.
    Deutsch, A., Tannen, V.: Mars: A system for publishing xml from mixed and redundant storage. In: Intl. Conf. on Very Large Data Bases (VLDB) (2003)Google Scholar
  5. 5.
    Deutsch, A., Tannen, V.: Reformulation of XML queries and constraints. In: Calvanese, D., Lenzerini, M., Motwani, R. (eds.) ICDT 2003. LNCS, vol. 2572, pp. 225–238. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  6. 6.
    Duschka, O.M., Genesereth, M.R.: Answering recursive queries using views. In: PODS (1997)Google Scholar
  7. 7.
    Duschka, O.M., Genesereth, M.R., Levy, A.Y.: Recursive query plans for data integration. Journal of Logic Programming 43(1), 49–73 (2000)zbMATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Fagin, R., Kolaitis, P.G., Miller, R.J., Popa, L.: Data exchange: Semantics and query answering. In: Calvanese, D., Lenzerini, M., Motwani, R. (eds.) ICDT 2003. LNCS, vol. 2572, pp. 207–224. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  9. 9.
    Florescu, D., Levy, A.Y., Manolescu, I., Suciu, D.: Query optimization in the presence of limited access patterns. In: SIGMOD, pp. 311–322 (1999)Google Scholar
  10. 10.
    Grant, J., Minker, J.: A logic-based approach to data integration. Theory and Practice of Logic Programming 2(3), 323–368 (2002)zbMATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    Halevy, A.: Answering queries using views: A survey. VLDB Journal 10(4), 270–294 (2001)zbMATHCrossRefGoogle Scholar
  12. 12.
    Koch, C.: Query rewriting with symmetric constraints. AI Communications 17(2) (2004) (to appear)Google Scholar
  13. 13.
    Levy, A.Y.: Logic-based techniques in data integration. In: Minker, J. (ed.) Workshop on Logic-Based Artificial Intelligence, Washington, DC (1999)Google Scholar
  14. 14.
    Levy, A.Y., Rajaraman, A., Ordille, J.J.: Querying heterogeneous information sources using source descriptions. In: 22nd Intl. Conf. on Very Large Data Bases (VLDB), Bombay, India, pp. 251–262 (1996)Google Scholar
  15. 15.
    Li, C.: Computing complete answers to queries in the presence of limited access patterns. Journal of VLDB 12, 211–227 (2003)CrossRefGoogle Scholar
  16. 16.
    Li, C., Chang, E.: On answering queries in the presence of limited access patterns. In: Van den Bussche, J., Vianu, V. (eds.) ICDT 2001. LNCS, vol. 1973, p. 219. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  17. 17.
    Millstein, T.D., Levy, A.Y., Friedman, M.: Query containment for data integration systems. In: PODS, pp. 67–75 (2000)Google Scholar
  18. 18.
    Nash, A., Ludäscher, B.: Processing first-order queries under limited access patterns. In: PODS, Paris, France (2004)Google Scholar
  19. 19.
    Nash, A., Ludäscher, B.: Processing unions of conjunctive queries with negation under limited access patterns. In: Bertino, E., Christodoulakis, S., Plexousakis, D., Christophides, V., Koubarakis, M., Böhm, K., Ferrari, E. (eds.) EDBT 2004. LNCS, vol. 2992, pp. 422–440. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  20. 20.
    Rajaraman, A., Sagiv, Y., Ullman, J.D.: Answering queries using templates with binding patterns. In: PODS, pp. 105–112 (1995)Google Scholar
  21. 21.
    Sagiv, Y., Yannakakis, M.: Equivalences among relational expressions with the union and difference operators. Journal of the ACM 27(4), 633–655 (1980)zbMATHCrossRefMathSciNetGoogle Scholar
  22. 22.
    Ullman, J.: The complexity of ordering subgoals. In: PODS (1988)Google Scholar
  23. 23.
    Vassalos, V., Papakonstantinou, Y.: Expressive capabilities description languages and query rewriting algorithms. Journal of Logic Programming 43(1), 75–122 (2000)zbMATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Alin Deutsch
    • 1
  • Bertram Ludäscher
    • 1
  • Alan Nash
    • 1
  1. 1.University of CaliforniaSan Diego

Personalised recommendations