Algebraic Rewritings for Optimizing Regular Path Queries

  • Gösta Grahne
  • Alex Thomo
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1973)


Rewriting queries using views is a powerful technique that has applications in query optimization, data integration, data warehousing etc. Query rewriting in relational databases is by now rather well investigated. However, in the framework of semistructured data the problem of rewriting has received much less attention. In this paper we focus on extracting as much information as possible from algebraic rewritings for the purpose of optimizing regular path queries. The cases when we can find a complete exact rewriting of a query using a set a views are very “ideal.” However, there is always information available in the views, even if this information is only partial. We introduce “lower” and “possibility” partial rewritings and provide algorithms for computing them. These rewritings are algebraic in their nature, i.e. we use only the algebraic view definitions for computing the rewritings. This fact makes them a main memory product which can be used for reducing secondary memory and remote access. We give two algorithms for utilizing the partial lower and partial possibility rewritings in the context of query optimization.


Regular Expression Regular Language Query Optimization Conjunctive Query Database Graph 
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. [Abi97]
    S. Abiteboul. Querying Semistructured Data. Proc. of ICDT 1997 pp. 1–18.Google Scholar
  2. [ABS99]
    S. Abiteboul, P. Buneman and D. Suciu. Data on the Web: From Relations to Semistructured Data and Xml. Morgan Kaufmann, 1999.Google Scholar
  3. [AD98]
    S. Abiteboul, O. M. Duschka. Complexity of Answering Queries Using Materialized Views. Proc. of PODS 1998 pp. 254–263Google Scholar
  4. [AHV95]
    S. Abiteboul, R. Hull and V. Vianu. Foundations of Databases. Addison-Wesley, 1995.Google Scholar
  5. [AQM+97]
    S. Abiteboul, D. Quass, J. McHugh, J. Widom and J. L. Wiener. The Lorel Query Language for Semistructured Data. Int. J. on Digital Li-braries 1997 1(1) pp. 68–88.Google Scholar
  6. [Bun97]
    P. Buneman. Semistructured Data. Proc. of PODS 1997, pp. 117–121.Google Scholar
  7. [BDFS97]
    P. Buneman, S. B. Davidson, M. F. Fernandez and D. Suciu. Adding Structure to Unstructured Data. Proc. of ICDT 1997, pp. 336–350.Google Scholar
  8. [CGLV99]
    D. Calvanese, G. Giacomo, M. Lenzerini and M. Y. Vardi. Rewriting of Regular Expressions and Regular Path Queries. Proc. of PODS 1999, pp. 194–204.Google Scholar
  9. [CGLV2000]
    D. Calvanese, G. Giacomo, M. Lenzerini and M. Y. Vardi. Answering Regular Path Queries Using Views. Proc. of ICDE 2000, pp. 389–398.Google Scholar
  10. [CGLV2000]
    D. Calvanese, G. Giacomo, M. Lenzerini and M. Y. Vardi. View-Based Query Processing for Regular Path Queries with Inverse. Proc. of PODS 2000, pp. 58–66.Google Scholar
  11. [Con71]
    J. H. Conway. Regular Algebra and Finite Machines. Chapman and Hall 1971.Google Scholar
  12. [DFF+99]
    A. Deutsch, M. F. Fernandez, D. Florescu, A. Y. Levy, D. Suciu. A Query Language for XML. WWW8/Computer Networks 31(11-16) 1999, pp. 1155–116.Google Scholar
  13. [DG97]
    O. Duschka and M. R. Genesereth. Answering Recursive Queries Using Views. Proc. of PODS 1997, pp. 109–116.Google Scholar
  14. [FS98]
    M. F. Fernadez and D. Suciu. Optimizing Regular path Expressions Using Graph Schemas Proc. of ICDE 1998, pp. 14–23.Google Scholar
  15. [FLS98]
    D. Florescu, A. Y. Levy, D. Suciu Query Containment for Conjunctive Queries with Regular Expressions Proc. of PODS 1998, pp. 139–148.Google Scholar
  16. [GM99]
    G. Grahne and A. O. Mendelzon. Tableau Techniques for Querying Information Sources through Global Schemas. Proc. of ICDT 1999 pp. 332–347.Google Scholar
  17. [GT2000]
    G. Grahne and A. Thomo. An Optimization Technique for Answering Regular Path Queries. Proc. of WebDB 2000.Google Scholar
  18. [HU79]
    J. E. Hopcroft and J. D. Ullman Introduction to Automata Theory, Languages, and Computation. Addison-Wesley 1979.Google Scholar
  19. [HRS76]
    H. B. Hunt and D. J. Rosenkrantz, and T. G. Szymanski, On the Equivalence, Containment, and Covering Problems for the Regular and Context-Free Languages. Journal of Computing and System Sciences 12(2) 1976, pp. 222–268zbMATHMathSciNetGoogle Scholar
  20. [Kari91]
    L. Kari. On Insertion and Deletion in Formal Languages. Ph.D. Thesis, 1991, Department of Mathematics, University of Turku, Finland.Google Scholar
  21. [Lev99]
    A. Y. Levy. Answering queries using views: a survey. Submitted for publication 1999.Google Scholar
  22. [LMSS95]
    A. Y. Levy, A. O. Mendelzon, Y. Sagiv, D. Srivastava. Answering Que-ries Using Views. Proc. of PODS 1995, pp. 95–104.Google Scholar
  23. [MW95]
    A. O. Mendelzon and P. T. Wood, Finding Regular Simple Paths in Graph Databases. SIAM J. Comp. 24:6, (December 1995).Google Scholar
  24. [MMM97]
    A. O. Mendelzon, G. A. Mihaila and T. Milo. Querying theWorld Wide Web. Int. J. on Digital Libraries 1(1), 1997 pp. 54–67.Google Scholar
  25. [MS99]
    T. Milo and D. Suciu. Index Structures for Path Expressions. Proc. of ICDT, 1999, pp. 277–295.Google Scholar
  26. [PV99]
    Y. Papakonstantinou, V. Vassalos. Query Rewriting for Semistructured Data. proc. of SIGMOD 1999, pp. 455–466Google Scholar
  27. [Ull97]
    J. D. Ullman. Information Integration Using Logical Views. Proc. of ICDT 1997, pp. 19–40.Google Scholar
  28. [Var88]
    M. Y. Vardi. The universal-relation model for logical independence. IEEE Software.Google Scholar
  29. [Yu97]
    S. Yu. Reqular Languages. In: Handbook of Formal Languages. G. Ro-zenberg and A. Salomaa (Eds.). Springer Verlag 1997, pp. 41–110Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2001

Authors and Affiliations

  • Gösta Grahne
    • 1
  • Alex Thomo
    • 1
  1. 1.Concordia UniversityCanada

Personalised recommendations