Databases Reference
In-Depth Information
MO
contains six rules for
mo:Person
that differ only in
the last condition (
r
=
k
), 1
M
Then the composition
≤
k
≤
6. These can be reduced to a single rule:
mo:Person
(
p
)
←
castinfo
(
c, p, m, r
)
,
(
r
=1)
∨···∨
(
r
=6)
.
Note that such disjunctions lend themselves to ecient evaluation by RDBMSs.
Materialised ABoxes and Semantic Index.
In addition to working with proper
relational data sources,
also supports ABox storage in the form of struc-
tureless
universal tables
: a binary relation
CA
[
id, concept-id
] and a ternary re-
lation
RA
[
id
1
, id
2
, role-id
] represent concept and role assertions. The universal
tables give rise to trivial mappings, and
Ontop
implements a technique, the
se-
mantic index
[59], that takes advantage of SQL features in
Ontop
-mappings for this
scenario. The key observation is that, since the IDs in the universal tables
CA
and
RA
can be chosen by the system, each concept and role in the TBox
T
T
can be assigned a numeric
index
and a set of numerical
intervals
in such a way
that the resulting
T
-mapping contains simple SQL queries with interval filter
conditions. For example, in IMDb, we have
mo:Actor
mo:Artist,
mo:Artist
mo:Person,
mo:Director
mo:Person,
so we can choose indexes and intervals for these concepts as in the table below:
mo:Person
(4) [1,4]
concept
index interval
mo:Actor
1
[1,1]
mo:Director
(3) [3,3]
[1,2]
mo:Artist
(2)
mo:Artist
2
[1,2]
mo:Director
3
[3,3]
[1,1]
mo:Actor
(1)
mo:Person
4
[1,4]
It can be seen that these intervals respect the concept inclusions of the TBox:
e.g., [1,1] for
mo:Actor
is a subset of [1,2] for
mo:Artist
. This will generate a
T
-mapping with
mo:Actor
(
p
)
←
CA
(
p, concept-id
)
,
(
concept-id
=1)
,
mo:Artist
(
p
)
←
CA
(
p, concept-id
)
,
(1
≤
concept-id
≤
2)
,
mo:Director
(
p
)
←
CA
(
p, concept-id
)
,
(
concept-id
=3)
,
mo:Person
(
p
)
←
CA
(
p, concept-id
)
,
(1
≤
concept-id
≤
4)
.
Thus, by choosing appropriate concept and role IDs, we effectively construct
H-complete ABoxes
without
the expensive forward chaining procedure (and the
need to store large amounts of derived assertions). On the other hand, the se-
mantic index
-mappings are based on range expressions that can be evaluated
eciently by RDBMSs using standard B-tree indexes [19].
T