Databases Reference
In-Depth Information
where
list(
)
specifies an
n
-th element in a list. Although the ordering in a set
is meaningless, it is convenient to specify
set(
num
num
)
for taking a specific element.
We define
set(
)
as an
n
-th element arranged by a system.
For access paths
a
1
,
a
2
,
we define
num
when there exists K
path
8
p
and
a
1
.
p
=
a
2
.
By applying
a-path
for a given graph, we can specify a substructure of a graph
as follows:
In this case, we define as follows:
We can get the same result by using identifiers
id
instead of graphs. It can be
extended to a set of graphs as follows:
We call a graph with a sequence of labels an access path. Here is a value, when a
specified label does not exist. In a case of
const=“list”,
cannot be omitted, while in
a case of
const=“set”,
and same or redundant elements are reduced.
For example,
g
0
.book-order.goods.book
in Figure 3 points {
g
312,
g
322
}.
4.2
Basic Retrieval
A query is a logical combination of unit queries, each of which is in the following
form:
specified by access paths. Data is
generated by the definition in Section 3.2.2. Data included in logical elements is
similarly generated. The result of a unit query is a set of (sub)graphs. For example,
in Figure 3, a query,
g
0
.book-order.goods.book.publish
=2000 returns {
g
321
}.
Remark that a graph can be transformed into a set of access paths. For example,
g
321
in the above example can be transformed into a set of an access path,
g
0
.book-
order.goods.book
[
set
(2)] by adding
set(
Retrieval is executed for a set of
l-attr
or
e-attr
)
for identifying an
element of a set to its corresponding label. If
g
321
is referred by multiple nodes, we
num
)
or
list(
num