foreign key integrity constraint is an expression
of the form fkey(R, A, R
′
, A
′
). An instance I of R
is consistent with fkey(R, A, R
′
, A
′
) if I satisfies
unique(R
′
, A
′
), and
R(t) ∧t.A 6= NULL ⇒ ∃t
′
.(R
′
(t
′
) ∧ t
′
.A
′
= t.A)
5. Inherit is a set of inheritance integrity con-
straints, i.e. pairs of the form (pkey(R, A),
fkey(R, A, R
′
, A
′
)). An instance I of R is consis-
tent with (pkey(R, A), fkey(R, A, R
′
, A
′
)), if I sat-
isfies both pkey(R, A) and f key(R, A, R
′
, A
′
).
Let (R, IC) be a db-schema and I be an instance of
R. A database DB = (R, IC, I) is consistent, if I sat-
isfies (is a model of) all integrity constraints, denoted
I |= IC. Otherwise we say that DB is inconsistent.
For the database DB
a
with relation schema in Fig-
ure 2, we assume (the prefix a : is omitted):
IC
a
= {pkey(Person, PId), pkey(Student, SId), pkey(
Course, CId), pkey(Exam, EId), fkey(Student, SId,
Person, PId), pkey(Exam, ESId, Student, SId),
pkey(Exam, Course, Course, CId), notnull(Student,
Faculty), notnull(Exam, Grade)}.
Analogously, for DB
b
. Note, that Name can be NULL
in both databases.
4 DK-EXCHANGE
4.1 Translation of a Database
While translating a relational database into a DL
knowledge base, the following should be taken into ac-
count:
1. A traditional DL knowledge base understood as a
pair (T , A) is unable to model integrity constraints
(Motik et al., 2009). The reason is two-fold: firstly,
axioms in T are interpreted under the standard
first-order semantics and are treated as deductive
rules and not as checks, and secondly, the UNA is
not accepted in general in DL knowledge bases, it
means that two different individual names can de-
note the same individual.
2. In the translation, semantics of the database should
be preserved, i.e. any consistent (inconsistent)
database should be translated into a consistent (in-
consistent) DL knowledge base.
Now, we define a relational knowledge base
(RKB) that is a DL knowledge base adequately rep-
resenting a relational database. RKB is based on the
concept of EKB (Motik et al., 2009). We propose and
discuss a system of TBox axioms, which properly rep-
resents a relational database defined in the previous
section.
A relational knowledge base is a tuple RKB =
(N, S , C , A), where:
1. N is the vocabulary of RKB, consisting of a set
N
Ind
of individual names, a set N
Cl
of class names
(or atomic concepts), a set N
OP
of object property
names (or atomic roles).
2. S is a finite set of standard TBox axioms, which
are treated as deductive rules and can infer new as-
sertions.
3. C is a finite set of integrity constraint TBox ax-
ioms, which are treated as checks, and must be sat-
isfied by any minimal Herbrand model of the set of
assertions implied by A and S . Axioms in C can-
not imply new assertions.
4. A is a set of ABox assertions, i.e. class member-
ships and properties of individual objects.
The translation is made by a data-to-knowledge ex-
change (dk-exchange) system M = (τ, Σ), such that
for each db-schema (R, IC) and every instance I of R,
M (R, IC, I) = (τ(R, IC), Σ(I)) = (N, S , C , A), where
τ(R, IC) = (N, S, C ), and Σ(I) = A.
Creating Vocabulary. Let ∆
Var
be a countable infi-
nite set of labeled nulls disjoint from the set of con-
stants. Labeled nulls, denoted X, V, X
1
, V
1
, ..., are used
as ”fresh” Skolem terms, which are placeholders for
unknownvalues, and can thus be seen as variables (Fa-
gin et al., 2005). The vocabulary N = N
Ind
∪N
Cl
∪N
OP
,
is created as follows: (1) The set N
Ind
of individual
names consists of the union of Const and ∆
Var
. (2)
There are predefined class names Tuple and Val of,
respectively, individuals called tuples and individuals
called attribute values. (3) For each relation symbol
R ∈ R, there is a class name C
R
∈ N
Cl
, every individ-
ual in C
R
is a tuple. (4) For each attribute A ∈ att(R),
there is a class name C
A
∈ N
Cl
(every individual in
C
A
is an attribute value), and an object property name
P
A
∈ N
OP
; the object property P
A
connects tuples in C
R
with attribute values in C
A
.
Creating StandardTBox Axioms. The set S of standard
TBox axioms is given in Table 1. All these axioms are
deductive rules.
Table 1: Standard TBox axioms of relational knowledge
base.
Constraints of relational db DL
S1 R ∈ R C
R
⊑ Tuple
S2 A ∈ att(R), R ∈ R C
A
⊑ Val
S3 range of P
A
∃P
−
A
⊑ C
A
S4 domain of P
A
∃P
A
⊑ C
R
S5 unique(R, A) (func P
−
A
)
S6 (pkey(R, A), fkey(R, A, R
′
, A
′
)) P
A
⊑ P
A
′
(S1) and (S2) belong to translation of facts that R ∈ R
and A ∈ att(R); they say that all tuple names in C
R
,
ICEIS2013-15thInternationalConferenceonEnterpriseInformationSystems
306