Database Reference
In-Depth Information
GraphQL
GraphQL [ 17 ] is a graph query language for graphs with arbitrary attributes and
sizes. In GraphQL, graphs are the basic unit of information. Then, each operator
takes one or more collections of graphs as input and generates a collection of graphs
as output. It is based on graph algebra and the FLWR (For, Let, Where, and Return)
expressions used in Xquery (see next section). In the graph algebra, the selection
operator is generalized to graph pattern matching and a composition operator is
introduced for rewriting matched graphs using the idea of neighborhood subgraphs
and profiles, refinement of the overall search space, and optimization of the search
order.
9.2.2.3 Formal Languages
LDM
The Logical Database Model [ 6 ] presents a logic very much in the spirit of
relational tuple calculus, which uses fixed types of variables and atomic formulas
to represent queries over a schema using the power of full first-order languages.
Figure 9.9 presents the LDM schema and instances.
The result of a query is another LDM schema called 'query schema,' which
consists of those objects over a valid instance that satisfy the query formula. In
addition, the model presents an alternative algebraic query language proved to be
equivalent to the logical one.
Gram
Gram [ 23 ] is an algebraic language based on regular expression and supporting a
restricted form of recursion.
Figure 9.10 shows the data model used by Gram. Regular expressions over data
types are used to select walks (paths) in a graph. It uses a data model where walks
are the basic objects. A walk expression is a regular expression without union,
x
I (Name)
Val( I )
I (Last_Name)
Val( I )
I (Thesis_topic)
Val ( I )
I
I
I
Student
Supervisor
x
x
1
Yan
4
Smith
7
Ontology
2
Sara
5
James
8
graph
3
Alain
6
Jones
Thesis_
Topic
Last-Name
Name
Name
I (Student)
I
Val( I )
9
(1,4,7)
10
(2,5,7)
11
(3,6,8)
Fig. 9.9 Logical Data Model: The schema (on the left ) and part of instances (on the right )
Search WWH ::




Custom Search