Database Reference
In-Depth Information
existing proposals support very little functionality for grouping and aggregation.
Moreover, aggregated functions such as COUNT, MIN, and MAX applied to
paths could be used to answer queries in order to analyze data (like the degree
of a node, the distance between nodes, and the diameter of a graph). We can find
exceptions in Versa, RQL, and N3, which support count functionality aggrega-
tion in path and nodes, are not explicitly treated by any languages that need to
be considered as a requirement.
9.3.2 XML Query Languages
The Extensible Markup Language (XML) is a subset of SGML. XML data are
labeled ordered trees (with labels on nodes), where internal nodes define the
structure, and leaves the data (scheme and data are mixed.). XML additionally
provides a referencing mechanism among elements that allows the simulation of
arbitrary graphs. In this sense, XML can simulate semistructured data. Also, many
new extensions of XML are designed to represent graphs such as GML, GraphML,
and XGML.
Current query languages [ 34 ] for XML do not support the majority features for
graph-structured XML document. The principal feature supported is path. For
example, XPath 7 uses path expressions to select nodes or node sets in an XML
document. Also, the set of axes defined in XPath is clearly designed to allow the set
of graph traversal operations that are seen to be atomic in XML document trees. An
XPath axis is fundamentally a mapping from nodes to node sets and defines a way
of traversing the underlying graph. Each axis encapsulates two things: a type of
edge to follow (e.g., child vs. attribute) and whether it is followed transitively (e.g.,
child vs. descendant). Also, XQuery 8 uses XPath to express complex paths and
supports flexible query semantics. In XML-QL [ 43 ], path expressions are admitted
within the tag specification and they permit the alternation, concatenation, and
Kleene-star operators, similar to those used in regular expressions. In XML-GL
[ 35 ], the only path expressions supported are arbitrary containment, by means of a
wildcard* as the edge label; this allows the traversal of the XML-GL graph,
reaching an element at any level of depth. However, current query languages for
XML are designed for tree-structured XML data and do not support the matching of
schema in the form of general graph. Even though XPath can express a node with
multiple parents by multiple constraints with axis “parent,” it cannot express a
graph with cycles. While XML will not allow multiple parents, there is nothing in
XQuery (or XPath in particular) which precludes a traversal from parent to child to
a different parent. This insufficiency does not allow the presentation and the query
of all kinds of graphs, particularly those on social networks.
7
http://www.w3.org/TR/xpath
8 http://www.w3.org/TR/xquery/
Search WWH ::




Custom Search