Abstract
In this paper we present a graphical query language for XML. The language, based on a simple form of graph grammars, permits us to extract data and reorganize information in a new structure. As with most of the current query languages for XML, queries consist of two parts: one extracting a subgraph and one constructing the output graph. The semantics of queries is given in terms of graph grammars. The use of graph grammars makes it possible to define, in a simple way, the structural properties of both the subgraph that has to be extracted and the graph that has to be constructed. We provide an example-driven comparison of our language w.r.t. other XML query languages, and show the effectiveness and simplicity of our approach.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
References
S. Abiteboul, “Semistructured data,” in Proc. International Conference on Database Theory, Delphi, Greece, 1997, pp. 1–18.
S. Abiteboul, P. Buneman, and D. Suciu, Data on the Web: From Relations to Semistructured Data and XML, Morgan Kauffman, San Francisco, CA, 1999.
S. Abiteboul and S. Grumbach, “COL: A logic-based language for complex objects,” in Proc. Int. Conf. on Extending Database Technology, Venice, Italy, 1988, pp. 271–293.
S. Abiteboul, R. Hull, and V. Vianu, Foundations of Databases, Addison-Wesley, Boston, MA, 1994.
S. Abiteboul and V. Vianu, “Regular path queries with constraints,” in Proc. PODS, Tucson, Arizona, 1997, pp. 122–133.
S. Abiteboul, D. Quass, J. McHugh, J. Widom, and J. L. Wiener, “The Lorel query language for semistructured data,” Journal of Digital Libraries1(1), 1997, 68–88.
C. Beeri, S. Naqvi, O. Shmueli, and S. Tsur, “Set constructors in a logic database language,” Journal of Logic Programming10(1/2/3&4), 1991, 181–232.
A. Bonifati and S. Ceri, “Comparative analysis of five XML query languages,” SIGMOD Record29(1), 2000, 68–79.
P. Buneman,“Semistructured data,” in Proc. PODS, Tucson, AZ, 1997.
P. Buneman, W. Fan, and S. Weinstein, “Path constraints in semistructured and structured databases,” in Proc. PODS, Austin, TX, 1988, pp. 129–138.
S. Ceri, S. Comai, E. Damiani, P. Fraternali, S. Paraboschi, and L. Tanca, “XML-GL: A graphical language for querying and restructuring XML documents,” Computer Networks31(11–16), 1999, 1171–1187.
S. Ceri, S. Comai, E. Damiani, P. Fraternali, and L. Tanca, “Complex queries in XML-GL,” in ACM Symp. on Applied Computing, Vol. 2, 2000, pp. 888–893.
S. Ceri, P. Fraternali, and S. Paraboschi, “XML: Current developments and future challenges for the database community,” in Proc. Int. Conf. on Extending Database Technology, Como, Italy, 2000, pp. 3–17.
V. Christophides, S. Cluet, and G. Moerkotte, “Evaluating queries with generalized path expressions,” in Proc. of the ACM SIGMOD Conf. on Management of Data, Montreal, Canada, 1996, pp. 413–422.
M. Consens and A. Mendelzon, “GraphLog: A visual formalism for real life recursion,” in Proc. PODS, Nashville, TN, 1990, pp. 404–416.
E. Damiani and L. Tanca, “Blind queries to XML data,” in Proc. Int. Conf. on Database and Expert Systems Applications, London/Greenwich, UK, 2000, pp. 345–356.
D. Chamberlin, D. Florescu, J. Robie, J. Siméon, and M. Stefanescu, “XQuery: A query language for XML,” 2000, http://www.w3.org/TR/2001/WD-xquery-20010215.
A. Deutsch, M. F. Fernandez, D. Florescu, D. A. Levy, and D. Suciu, “A query language for XML,” Computer Networks31(11–16), 1999, 1155–1169.
J. Engelfriet, “Context-free graph grammars,” in Handbook of Formal Languages, Vol. 3, Beyond Words, G. Rozenberg and A. Salomaa, Eds., Springer-Verlag, London, UK, 1997, pp. 125–213.
M. F. Fernandez, D. Florescu, J. Kang, A. Y. Levy, and D. Suciu, “STRUDEL: A website management system,” in Proc. ACM SIGMOD Conf. on Management of Data, Tucson, AZ, 1997, pp. 549–552.
M. F. Fernandez, J. Simeon, and P. Wadler, “An algebra for XML query,” in Int. Conf. on Found. of Software Technology and Theoretical Computer Science, New Delhi, India, 2000, pp. 11–45.
S. Flesca, F. Furfaro, and S. Greco, “Graph grammars for querying graph-like data,” in Workshop on Graph Transformation and Visual Modeling Techniques (GT-VMT), Crete, Greece, 2001.
S. Flesca, F. Furfaro, and S. Greco, “A graph grammars based framework for querying graph-like data,” ISI-CNR Technical Report 8, Cosenza, Italy, 2002, submitted for publication.
S. Flesca and S. Greco, “Querying graph databases,” in Proc. Int. Conf. on Extending Database Technology, Konstanz, Germany, 2000, pp. 510–524.
S. Flesca and S. Greco, “Partially ordered regular languages for graph queries,” in Proc. Int. Colloquium on Automata, Languages and Programming, Prague, Czech Republic, 1999, pp. 321–330.
S. Grumbach, M. Rafanelli, and L. Tininini, “Querying Aggregate Data,” in Proc. PODS, Philadephia, PA, 1999, pp. 174–184.
Z. G. Ives and Y. Lu, “XML query languages in practice: An evaluation,” in Proc. Web-Age Information Management, Shanghai, China, 2000, pp. 29–40.
D. Konopnicki and O. Shmueli, “W3QS: A query system for the World-Wide-Web,” in Proc. Int. Conf. on Very Large Data Bases, Zürich, Switzerland, 1995, pp. 54–65.
G. M. Kuper, “Logic programming with sets,” Journal of Computer and System Science41, 1990, 44–64.
L. Lakshmanan, F. Sadri, and I. Subramanian, “A declarative language for querying and restructuring the web,” in Proc. Int. Workshop on Research Issues in Data Engineering, New Orleans, LA, 1996, pp. 12–21.
G. Mecca, P. Atzeni, A. Masci, P. Merialdo, and G. Sindoni, “The Araneus web-base management system,” in Proc. of SIGMOD Conference, Seattle, WA, 1998, pp. 544–546.
A. Mendelzon, G. Mihaila, and T. Milo, “Querying the World Wide Web,” Journal of Digital Libraries1(1), 1997, 54–67.
B. Oliboni and L. Tanca, “Querying XML specified WWW sites: Links and recursion in XML-GL,” in Proc. Int. Conf. Computational Logic, London, UK, 2000, pp. 1167–1181.
J. Paredaens, P. Peelman, and L. Tanca, “G-Log: A declarative graphical query language,” in Proc. Int. Conf. on Deductive and Object-Oriented Databases, Munich, Germany, 1991, pp. 108–128.
D. Suciu, “Semistructured Data and XML,” in Proc. Int. Conf. on Foundations of Data Organization and Algorithms, Kobe, Japan, 1998.
XML query requirements, W3C working draft, http://www.w3.org/TR/xmlquery-req
XQuery formal semantics, W3C working draft, http://www.w3.org/TR/query-semantics
XQuery use cases, W3C working draft, http://www.w3.org/TR/xmlquery-use-cases
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Flesca, S., Furfaro, F. & Greco, S. A Query Language for XML Based on Graph Grammars. World Wide Web 5, 125–157 (2002). https://doi.org/10.1023/A:1019627607240
Issue Date:
DOI: https://doi.org/10.1023/A:1019627607240