<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>1992]
within the YAK knowledge representation system.
cial Intelligence Journal</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>modied data from the DB is needed. no periodical updating of the KB with new or instances of concepts can be done; just as an ex- ample, in our system queries like C(x)^R(x; y)^ more complex queries than simply asking for the D(y) can be made. answers are given on the basis of the current state of the KB and the DB.</article-title>
      </title-group>
      <pub-date>
        <year>1992</year>
      </pub-date>
      <volume>422</volume>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>cle it is, of course, much more recommended to link
dividuals: often most of them are already completely
DBox, except the one of (quickly) retrieving lists
means of a relational database, and queries to the
such a way that a uniform query function, based on
data from these databases to our knowledge bases.
{ i.e., belonging to a unary table/view { or being in
be collected ex-novo it can be to manage convenient5
over, they are automatically kept updated as far as
description we say also that the set of data ex- W3;
These conditions are of the kind of being in a class
separately exist, for both the ABox and the DBox,
most of them by means of a DBMS.</p>
      <p>DBox can be done in SQL. Therefore in the
followas it can be, for example, expressed in SQL. Since
the two answering functions, can be implemented.
ing we will refer to tables/views { or simply tables {
minimum the eort of transferring data and,
moreWe do not require any special capability from the
of tuples of items satisfying requested conditions.
a knowledge base KB = hT ; W; Di can be dened in
suming that two complete query answering functions
relation with other items { i.e., belonging to a
binary table/view { and logical combinations of these,
to those of SQL.4
complex, but can also involve a large number of
inexperience suggests that, in realis- [Bresciani,1992]
as they usually are intended in relational databases,
the linked databases are. But also when data must
tic applications, knowledge bases not only can be
and to the query answering function of the DBox as
the databases to the knowledge bases. Using a DBox
paradigm we obtain the advantage of reducing to the
SQL, we assume that D is somehow represented by
pressed in a DBox constitutes a data base D.
Asour implementation relies, in fact, on a DBMS with
several times, in the past, the task of transferring
and suitably described in some database. We faced
&gt;From the point of view of users of KBMS, our
Using the techniques described in the present
artisingle instances are, therefore, already placed in the
As mentioned, in our KB, D is assumed to contain
This corresponds to having each table of D
associated with a primitive of T . We will show how term6
not supposed to have any inferential power. The
completely a-priori realized under the right concept.
no structural knowledge, but just raw data, and is
right tables. That is, speaking in KR terms, they are
the association of those terms in T whose extensions
set of all the terms classied under t in T
(includM : T ! s.t. M (t) = fP M (x) j x 2 2DBtable,
diate db extension condition above. Therefore,
tables of records of data, without any reasoning
cative terms in T , and DBtable the set of tables in
homogeneous extension hypothesis can always be
are in D with the corresponding tables in the DB.</p>
      <p>DBtable is given, where PT is the set of
primiwe assume that a partial mapping P M : PT !
satised. The db isolation and the non
intermeKB = hT ; W; D;P M i.
for each class of individuals present in D: by this the
ing t). The marking function gives the (possibly
pability.</p>
      <p>To this extent it is enough to know this association
empty) set of tables necessary to retrieve all the
insubs(t) and P M (x) is dened g, where subs(t) is the
esis that D is just a at collection of unstructured
stances (pairs) of a given concept (relation).
Thereneeded to correctly drive the query mechanism is
fore, it is an important part of our KB, whose
deUnder these assumptions, all the information
such a way that a primitive term is introduced in T
for those terms that are leaf, for the non
intermenition, to be more precise, has now to be rephrased:
Consider that it is not dicult to design KB in
the DB. So, we can dene the marking function
diate db extension conditions reect the h
ypothselector similar to those in select-body,
correspondtively; field1 corresponds to the rst occurence of
tively. The from-body is the list of all the tables
inbindings via the variables in x. For simplicity, let
each use of constants. In both the forms field2 is a
variable in x, according to the fact that the vari- xi
the variable.
translated into an equivalent SQL query. Of course,
where the select-body is a list of column names of the
of SQL where-conditions of the kind field2=field1
with the union set of tables : : : ; and their fT1; Thg
us suppose that the tables returned by M are
comtion (let them be called left and right). The SQL
or field2=constant, where the rst form has to be
used for each variable that is used more than once,
volved { i.e., all the M The where-body is a list (Pi).
able appears for the rst time in the predicate xi
kind M ):left or M ):right, one for each (Pxi (Pxi
SELECT DISTINCT select-body
can be made correspond to a set of tables in the
FROM f rom-body
ing to positions in the query where the variable is
ing function M . At this point we have just to cope
DB, where the answers have to be found, it can be
each time it is reused, and the second form occurs for
WHERE where-body
in the rst place 7 or in the second place, respec- Pxi
it be called left), and two in the case of a
relafurther used or where the constant appears,
respectranslation is of the kind:
posed by one column in the case of a concept (let
When each predicate in a query q = ^ : : : ^ x:P1 Pn
the sets of tables can be easily found via the
markvious that, in order to avoid the generation of huge
set of the query can be unreasonably large, due
that a query is unconnected when it can be split into
the KBMS. Answering a query in KB means nding
answer sets, free variables should not be used, i.e.,
hx; y; zi:A(x) ^ R(x; y) ^ C(z). All the variables
call these sub-queries clusters. It is obvious that the
the answers of the sub-query hzi:C(z). We say that
the query body (i.e., the part at the right of the
requires the merging of results from the DBMS and
a set fx : : : ; x of tuples of instances s.t., for each 1; mg
such a query is unconnected. More in general, we say
dot). Indeed, we adopt a stronger restriction,
betuple x ^ : : :^ holds in KB. We call i, x:(P1 Pn)[x i]
two or more sub-queries s.t. all the variables
appearcause the former one still allows for some undesired
to the fact that all the answers of the sub-query
Due to the denition of answ er of a query, it is
obIn general answering, a query is more complex and
of them its answer set.
hx; yi:A(x) ^ R(x; y) have to be combined with all
appear in the body, but, nevertheless, the answer
situations. Let us consider, for example, the query:
ing in each of them does not appear in any other. We
each variable appearing in x must appear also in
such tuples answers of the query and the set of all
actly, if, after having reordered the variables, un
unIt is now clear that unconnected queries and
connected queries with only bound variables.
conected query is written as ^ : : :^ x:’1(x1) ’n(xn)
relevant result of answering an unconnected query is
queries with unbound variables may have
unreasonarately answering the clusters, in the sense that all
longer than those resulting by submitting the
sinresponding to the terms in T , and say that a term
ables appearing in x but not in y, and T (z) =
the asnwers sets of a generic cluster is xi:’i(xi)
P is:
The case of a connected (i.e., non unconnected)
1 li
To aord the answ ering of a query we need to split
{ where x is the concatenation of the other
veccombined by a sort of Cartesian product. More
ex^ : : : ^ where top correspond to the top(z1) top(zk),
gle clusters; to obtain all the tuples satisfying the
the formal denition of answer, we must consider
pability to the system. Therefore, we consider only
is S = . j I 2 : : : ; 2 fIj11 .I jnn j11 S1; Ijnn Sng.
the information is included in it. But, if we consider
denition of answer the single answers have to be
duced to the case of an unconnected query x:’(y)^
and the DBMS. To this extent we need, as a rst
ably large answer sets, without giving any further
castep, to mark all the possible atomic predicates,
corT (z), where z = : : : ; contains all the vari- hz1; zki
responds to the single clusters { and given that
tors (x = and : : : ; cor- x1. .xn), ’1(x1); ’n(xn)
it into sub-queries that can be answered by the two
most generic concept in T .
specialized query answering functions of the KBMS
query x:’(y) with unbound variables can be
reis dened .
- DB-marked i for eac h t 2 subs(P )\PT P M (t)
= ; : : : ; g, the answer set of the whole query Si fIi Ii
the fact that the overall result must contain tuples
equivalent to the union of the single results of
sep4.6 RETURN the only item left in result-list.
4.1-bis
Developments
let
5.1 Constraints on the Form of KB
5 Conclusion and Future
the individuals in KB. Using this representation for
merged into a single answer set as follow:
any marker, e.g., a star ‘?’. The star stands for all
fact answer sets , , and can be ASxKB ASxDB ASxM
the completion in step 3, it is now easy to rephrase
where I ? are equivalent to I except that are
lengthened by lling the k missing positions : : : ; with p1; pk
step 4 of the algorithm as a merging operation. In
marked term into SQL. For example, if the query is
this condition. In fact, while keeping the fact that
Indeed we can, at least in part, give up also with
primitive, denition. To this extent we need a much
ing from the DB cannot be inferred { we can allow
more complex schema for translating queries on
DBSQL translation could be:
such term to be used inside new, eventually even non
of the kind hxi:C(x) where C some(R; D), its =:
coherent with the fact that the raw information
comsuch term must be primitive { this is pragmatically</p>
    </sec>
  </body>
  <back>
    <ref-list />
  </back>
</article>