<!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 />
    <article-meta>
      <title-group>
        <article-title>SQOWL2: Transactional Type Inference for OWL 2 DL in an RDBMS</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Yu Liu</string-name>
          <email>yu.liu11@imperial.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Peter McBrien</string-name>
          <email>p.mcbrien@imperial.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computing, Imperial College London 180 Queens Gate</institution>
          ,
          <addr-line>London</addr-line>
          ,
          <country country="UK">UK</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>SQOWL2 is a compiler which allows an RDBMS to support sound reasoning of SROIQ(D) description logics, by implementing ontologies expressed in the OWL 2 DL language as a combination of tables and triggers in the RDBMS. The reasoning process is divided into two phases of classification of the T-Box and type inference of the A-Box. SQOWL2 establishes a relational schema based on classification completed using the Pellet reasoner, and performs type inference by using SQL triggers. SQOWL2 supports type inference over all OWL 2 DL constructs, and supports a more conventional relational schemas, rather than naively mapping OWL classes and properties to relational tables with one and two columns. Moreover, SQOWL2 is a transactional reasoning system (with full ACID properties), since the results of reasoning are available within the same transaction as that in which the base data of the reasoning was inserted.</p>
      </abstract>
      <kwd-group>
        <kwd>OWL 2 DL</kwd>
        <kwd>Description Logics</kwd>
        <kwd>Ontologies</kwd>
        <kwd>Reasoning</kwd>
        <kwd>Type Inference</kwd>
        <kwd>Database Triggers</kwd>
        <kwd>ACID Transactions</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>The most common storage method used in mainstream data processing is to
use a relational database management system (RDBMS), which have a
number of well known and understood properties. One key property is the ACID
property of transactions [6], which in outline, states that a group of operations
grouped together into a transaction should occur as an atomic action, and for
which once the results are reported, they are durable after a system crash. In the
context of reasoning on ontologies, the notion of transactions may be naturally
extended to the notion of transactional reasoning [12], where the results
of reasoning derived from data changed by the database operations should be
available as part of the atomic action of the transaction.</p>
      <p>To illustrate the concept of transactional reasoning, consider the description
logic rule Father ≡ Man " Parent. If the data about these classes were held in a
RDBMS, and John was recorded as a Man, then if a transaction added that John
was a Parent, then any query on the result of the transaction should also be able
to view that John is a Father. However, most approaches to storing ontology data
in an RDBMS will make the process of reasoning be detached from transaction
processing of the data. Specifically, in our example, after the transaction that
added John was a Parent, the database could be queried and find that he was
not a Father until a separate process of reasoning had derived that fact. Hence
we would say that these approaches do not support transactional reasoning.</p>
      <p>Our work focuses on reasoners that support the OWL language, and in
particular the OWL 2 DL version [13]. To achieve transactional reasoning, two
approaches were identified in [12]: view based reasoning (VBR), where rules
are used to derive the result of reasoning as each query is executed over the
database, and trigger based reasoning (TBR) where triggers (active rules)
are used to materialise the result of reasoning at data insert time, and queries
simply read the materialised views. As discussed in [12], the advantages and
disadvantages of using views or materialised views are well known, and each
serve different real world requirements. In the context of reasoning, one specific
advantage of the TBR approach is that reasoning is incremental, and supports
very fast query processing. Examples of VBR approaches include DLDB2 [14]
and DBOWL [2], and of TBR include SQOWL [11]. This paper describes a
substantial improvement on SQOWL, called SQOWL2.</p>
      <p>To illustrate the issues addressed in this paper, we introduce the family
ontology1. It uses almost all the new OWL 2 features [7]. The family ontology
includes the following OWL 2 DL rules of T-Box (which contain classes that by
convention begin with upper case letters, and properties which by convention
start with lower case letters):</p>
    </sec>
    <sec id="sec-2">
      <title>Father ≡ Man " Parent (1) &amp; $ ∀hasParent.Person (13)</title>
      <sec id="sec-2-1">
        <title>Mother ≡ Woman " Parent (2) &amp; $ ∀hasParent−.Person (14)</title>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Parent ≡ Father # Mother (3) &amp; $ ∀hasGrandParent.Person (15)</title>
      <p>
        Father " Mother $ ⊥ (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) &amp; $ ∀hasGrandParent−.Person (
        <xref ref-type="bibr" rid="ref16">16</xref>
        )
&amp; $ ∀hasHusband.Man (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) &amp; $ ∃hasRelative.Self (17)
&amp; $ ∀hasHusband−.Woman (
        <xref ref-type="bibr" rid="ref6">6</xref>
        ) &amp; $ ¬∃hasParent.Self (18)
&amp; $ ∀hasSpouse.Person (
        <xref ref-type="bibr" rid="ref7">7</xref>
        ) hasParent " hasParent− $ ⊥ (19)
&amp; $ ∀hasSpouse−.Person (
        <xref ref-type="bibr" rid="ref8">8</xref>
        ) hasSpouse− $ hasSpouse (20)
&amp; $ ∀hasRelative.Person (
        <xref ref-type="bibr" rid="ref9">9</xref>
        ) hasHusband $ hasSpouse (21)
&amp; $ ∀hasRelative−.Person (
        <xref ref-type="bibr" rid="ref10">10</xref>
        ) hasParent " hasSpouse $ ⊥ (22)
&amp; $ ∀loves.Person (
        <xref ref-type="bibr" rid="ref11">11</xref>
        ) Narcissist ≡ ∃loves.Self (23)
&amp; $ ∀loves−.Person (
        <xref ref-type="bibr" rid="ref12">12</xref>
        ) hasParent ◦ hasParent $ hasGrandParent (24)
For example, rule (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) states that fathers are the intersection of things that are
both a man and a parent, and rule (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) states mothers are the intersection of
things that are both a woman and a parent. Rule (
        <xref ref-type="bibr" rid="ref6">6</xref>
        ) shows that the domain for
the hasHusband property is a Woman, and in (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) its range is a Man. Moreover, we
list several examples of OWL 2 DL constructors. For instance, reflexive,
irreflexive, asymmetric and symmetric properties can be demonstrated by rule (17),
      </p>
      <sec id="sec-3-1">
        <title>1 http://www.doc.ic.ac.uk/∼yl12510/family.owl</title>
        <p>(18), (19) and (20), respectively. Subsumption, disjointness, self restriction and
property chains can be described by rule (21), (22), (23) and (24), respectively.</p>
        <p>In addition to the T-Box, data in an OWL 2 DL ontology is called the A-Box,
and is stated as grounded predicates over the classes or properties of the T-Box.
Examples of such data in the family ontology are:</p>
        <p>hasHusband(Mary, John) (27)</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Father(John) (25)</title>
      <p>hasParent(Lewis, Albert) (28)</p>
    </sec>
    <sec id="sec-5">
      <title>Mother(Mary) (26)</title>
      <p>hasParent(Albert, Alex) (29)</p>
      <p>In the SQOWL approach presented in [11], a very simple process was used
where the OWL classes and properties are mapped to unary and binary relations,
as shown in Example 1.</p>
    </sec>
    <sec id="sec-6">
      <title>Father(id)</title>
    </sec>
    <sec id="sec-7">
      <title>Parent(id)</title>
    </sec>
    <sec id="sec-8">
      <title>Woman(id)</title>
    </sec>
    <sec id="sec-9">
      <title>Example 1. Narcissist(id) hasHusband(domain,range) hasSpouse(domain,range) hasParent(domain,range)</title>
      <p>Man(id)</p>
    </sec>
    <sec id="sec-10">
      <title>Mother(id)</title>
    </sec>
    <sec id="sec-11">
      <title>Person(id) hasGrandParent(domain,range) hasRelative(domain,range) loves(domain, range)</title>
      <p>
        The SQOWL approach then allowed the use of any OWL reasoner such as
FacT++ [3] or Pellet [15] to perform classification of the T-Box, which was
then used to build trigger rules over the relational schema. The type inference
over the A-Box then occurs as data is inserted into the RDBMS by the execution
of the triggers. For example, in classification, from rules (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) and (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) six rules can
be inferred:
      </p>
    </sec>
    <sec id="sec-12">
      <title>Father $ Man (30) Mother $ Woman (33)</title>
    </sec>
    <sec id="sec-13">
      <title>Father $ Parent (31) Mother $ Parent (34)</title>
    </sec>
    <sec id="sec-14">
      <title>Man " Parent $ Father (32) Woman"Parent $ Mother (35)</title>
      <p>From this classified schema, triggers were generated. For example, taking the
rules (30)–(32) above, we can derive four logical triggers (which we will detail
the syntax of in Section 3.2) of the form:
when +Father(x) then Man(x), when +Parent(x) if Man(x) then Father(x)
when +Father(x) then Parent(x), when +Man(x) if Parent(x) then Father(x)</p>
      <p>The SQOWL2 approach presented in this paper provides the following
significant improvements over the original SQOWL approach in [11].
1. SQOWL2 supports sound reasoning of the more recent OWL 2 DL
standard, as opposed to OWL 1 DL support by SQOWL. In particular SQOWL2
supports keys, property chains, and reflexive properties (Type inference of
qualified cardinality restrictions is introduced in [11]).
2. SQOWL2 gathers together all the reasoning rules associated with a
particular concept into a single trigger statement, rather than producing a separate
trigger statement per rule. Not only is this more efficient, but also in
allows SQOWL2 to generate triggers for those DBMS such as Microsoft’s SQL
Server that only support one trigger (of a given type) per table.
3. SQOWL2 uses the fact (originally from [1]) that a property is functional to
allow the property to be stored in the same table used to stored class that is
the domain of the property. This results in SQL schemas that are like those
one would produce via a conventional design process into 3NF schema, and
will allow SQOWL2 to be adapted so that it can be used to generate triggers
on top of existing relational schemas (as opposed to generating new schemas
with associated triggers).</p>
      <p>The remainder of the paper gives more detail of the operation and
performance of SQOWL2. Section 2 gives an overall architecture of SQOWL2, which
provides a complete system for building databases with triggers from
specifications in OWL 2 DL. Section 3 describes the details of the process used in
generating SQL triggers to implement the OWL 2 DL type inference process. Section
4 then evaluates SQOWL2 on how the SQOWL2 tool can be used, and its
performance over some benchmark datasets. Finally, Section 5 compares SQOWL2
with several related systems, and is followed by a conclusion section.
2</p>
      <p>SQOWL2 Architecture
SQOWL2 uses this division of the OWL 2 DL reasoning process (classification
of T-Box and type inference of A-Box) to build a reasoning system in several
steps, the overall design for which is illustrated in Figure 1.</p>
      <p>The T-Box (schema) from the ontology is then read using the OWL API [8].
Any A-Box (data) is also read and held until after the relational schema and
triggers have been created. In the current prototype, classification of the T-Box
(i.e. reasoning over the schema) is performed using Pellet, though in principle
any other reasoner could be used. The revised T-Box is then used to (a) produce
a relational schema, and (b) define triggers over that schema, which will perform
the reasoning outlined in the previous section.</p>
      <p>Once the schema and triggers have been created, the relational database is
now capable of performing type inference over the A-Box (i.e. reasoning over
the data). If the OWL 2 DL ontology contained an A-Box, then this is inserted
into database as the last phase of the SQOWL2 execution. Then the relational
database becomes a free standing type inference system, when inserts made
using SQL resulting in a type inference being performed, and derived data being
inserted into the database.
3</p>
      <p>From OWL 2 DL to Triggers
We now outline in more detail the reasoning process followed by SQOWL2 in first
generating a database schema, then deriving logical triggers over that schema.
For reasons of space we do not detail the mapping of the triggers in SQL
statements, but this process is very straightforward.
3.1</p>
      <p>Building a traditional RDB schema
SQOWL2 builds the relational database schema in two stages, which depends
on the classification results from Pellet. The first step builds a canonical
relational schema (Example 1), where each class maps to a unary relation, and each
property to a binary relation (i.e. a class is mapped to a relational table with
one column, and a property is mapped to a relational table with two columns).
Moreover, subclass relationships should be mapped as foreign keys.</p>
      <p>The second stage is to map the canonical schema to a physical relational
schema, by taking account of functional properties (cardinality restriction is
no more than one) and key properties (properties that together can uniquely
identify an object) and in the OWL 2 DL ontology. In general, if a class C(x) has
n functional properties (or key properties): P1(x, y1), . . . , Pn(x, yn) that contain
C as their domain, then we store the class and properties as a single table
C(x, y1, ... . . . , yn).</p>
      <p>For example, if hasHusband and hasSpouse are denoted as functional
properties in the family ontology, and hence are not stored as separate tables, but
instead are stored in the table representing the domain, giving the following
modified schema as Example 2.</p>
    </sec>
    <sec id="sec-15">
      <title>Father(id)</title>
    </sec>
    <sec id="sec-16">
      <title>Parent(id)</title>
    </sec>
    <sec id="sec-17">
      <title>Narcissist(id)</title>
    </sec>
    <sec id="sec-18">
      <title>Woman(id,hasHusband)</title>
      <sec id="sec-18-1">
        <title>Example 2. hasParent(domain,range)</title>
        <p>hasRelative(domain,range)
fk</p>
      </sec>
    </sec>
    <sec id="sec-19">
      <title>Father(id)⇒Man(id)</title>
      <p>fk</p>
    </sec>
    <sec id="sec-20">
      <title>Mother(id)⇒Woman(id) Man(id)</title>
    </sec>
    <sec id="sec-21">
      <title>Mother(id)</title>
    </sec>
    <sec id="sec-22">
      <title>Person(id,hasSpouse)</title>
      <p>hasGrandParent(domain,range)
loves(domain,range)</p>
      <p>fk</p>
    </sec>
    <sec id="sec-23">
      <title>Father(id)⇒Parent(id)</title>
      <p>Mother(id)⇒fkParent(id)
3.2</p>
      <p>Type inference by generating SQL triggers
Type inference needs to occur every time a data value is inserted into the
database schema, which is achieved by having SQL triggers invoke queries and
updates after each insert. For example, rule (30) implies all instances in Father
should also appear in Man. In this case, if data John is inserted into table Father,
a trigger needs to exist to insert John to table Man.</p>
      <p>SQL triggers are translated from constructors of OWL 2 DL ontologies
according to logical triggers. The logical triggers are of the general form:</p>
      <p>OWL 2 DL construct : ! when event if condition then action.
where event identifies the insertion of a particular class or property in the
database. There are two types of event: if event is prefixed with − then
condition and action are executed before the insertion, whilst if event is prefixed
with + then condition and action are executed after the insertion.</p>
      <p>SQL before triggers (PL/pgSQL)/instead of triggers (Transact SQL)
are used to implement − events, and after triggers, used for + events. The
condition is a Datalog query over the database, and action is one of insert,
ignore and reject.</p>
      <p>One basic rule deals with the notion that because of the open world nature of
reasoning, we might repeatedly infer the same fact, and thus we have to prevent
duplicate updates to a table. This is implemented by the logical trigger:
class: C ! when −C(x) if C(x) then ignore
This means that when a value is inserted into a table, before the actual insert is
done, a check is made to determine if the value is already present in the table,
and if so, the insert is ignored.</p>
      <p>Another simple logical trigger deals with subclass rules such as (30) and (31):
subClassOf: C $ D ! when +C(x) if true then D(x)
which ensures that any insert to a subclass is inferred to also be an insert to the
superclass. Similarly, the logical trigger for subproperty rule such as (21) is:
subPropertyOf: P $ Q ! when +P (x, y) if true then Q(x, y)</p>
      <p>A new feature of OWL 2 DL (compared to OWL 1 DL) is the property
chain, which allows for a property to be defined from the concatenation of two
or more other properties. For example, one can define that a parent of a parent
is a grandparent by rule (24). The logical trigger for a property chain (contains
two subchain properties) is:
propertyChain: P1 ◦ P2 $ P
! when +P1(x, y) if P2(y, z) then P (x, z)
! when +P2(y, z) if P1(x, y) then P (x, z)
Hence in the first rule, an insert to the first property in the chain causes a check
for matched data in the second property in the chain, and if found causes an
insert to the chained property table. We also generalise the above logical trigger
to handle the situation that a chain property contains n subchain properties:
propertyChain: P1 ◦ . . . ◦ Pi ◦ . . . ◦ P!n $ P
! when +P1(x, y) if P2,n(y, z) then P (x, z)</p>
      <p>!
! when +Pn(y, z) if P!1,n−1(x, y) then P (x, z)</p>
      <p>!
! when +Pi(p, q) if P1,i−1(x, p), Pi+1,n(q, z) then P (x, z) 1&lt;i&lt;n
!
where Pm,n(x, y) =</p>
      <p>πPm.domain,Pn.range σPj.range=Pj+1.domain(Pm × . . . × Pn) m≤j&lt;n
Therefore, the first and second situations mean that if there is an insertion to
the first or last subchain, the trigger will treat the remaining subchains as a
join unit and search data matched inside the unit. The third scenario handles
the insertion to the middle subchains (i.e. not the first or the last subchain) by
creating two join units and then fetching matching data from them.</p>
      <p>For example, in family ontology, rule (36) defines one subset of
hasBrotherInLaw that:</p>
      <p>hasSibling ◦ hasSpouse ◦ hasBrother $ hasBrotherInLaw (36)</p>
    </sec>
    <sec id="sec-24">
      <title>Thus, if hasSibling(Kate,Mary), hasBrother(John,Lewis), and an insertion (Mary,</title>
      <p>John) to table Man, the logic trigger will infer a new insertion (Kate, Lewis) to
table hasBrotherInLaw.</p>
      <p>Also introduced in OWL 2 DL is the ability to define a reflexive property,
an irreflexive property and a self restriction by allowing a special class Self
to be used in the range of a property (that corresponds to class in the domain).
The domain of a reflexive property is always the whole universe. For example,
rule (17) states property hasRelative is reflexive in which anyone is a relative
of them-self. The negative side of reflexivity is irreflexivity, which means no
individual is related to itself by a irreflexive property, such as hasParent defined
in rule (18). The logical triggers for reflexive &amp; irreflexive properties are:
reflexiveProperty: &amp; $ ∃P.Self ! when +&amp;(x) if ¬P (x, x) then P (x, x)
irreflexiveProperty: &amp; $ ¬∃P.Self ! when −P (x, x) if true then reject
In the case of reflexive properties, since their domain is always the whole
universe, each insert x in an ontology entails that (x, x) also needs to be inserted
to this property table. In contrast, in irreflexive properties, tuples like (x, x) are
not allowed to be inserted and should be rejected.</p>
      <p>Compared with reflexive properties, self restriction means the domain is not
always the whole universe. For example, rule (23) defines a new class Narcissist
in which all individuals love (e.g. property loves) themselves (i.e. the reflexivity
is limited only to Narcissist). The logical trigger for self restriction is:
selfRestriction: C ≡ ∃P.Self
! when +P (x, y) if x = y, ¬C(x) then C(x)
! when +C(x) if ¬P (x, x) then P (x, x)
This trigger enables that if a property tuple (x, x) is inserted to the self restricted
property, the data x should also be inserted to the related class. Moreover, if
there is an data x in the related class, the property tuple (x, x) should be inferred
and inserted to the property.</p>
      <p>
        In addition to the above new features, OWL 2 DL also improves its ability
of expressiveness by adding other constructors, such as disjoint union (rules (
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
and (
        <xref ref-type="bibr" rid="ref4">4</xref>
        )) between classes, asymmetric (rule (19)) and negative relations among
properties. The logical triggers for a disjoint union and an asymmetric property
are listed as follows.
      </p>
      <p>disjointUnion: CN ≡ C1 # . . . # Cn, Ci " Cj $ ⊥ 1≤i,j≤n,i#=j
! when −Ci(x) 1≤i≤n if f oreach(1 ≤ j ≤ n, j -= i), ¬Cj (x) then Ci(x)
if ¬CN (x) then CN (x).</p>
      <p>asymmetricProperty: P " P− $ ⊥ ! when −P (x, y) if P (y, x) then reject
The trigger for disjointUnion only allows insertion if the data which will be
inserted to a class does not appear in its disjoint classes (the trigger for disjoint
properties is in a similar way with properties). Moreover, in disjointUnion trigger,
any inserted data which does not exist in the union class will be inserted to the
union class. Furthermore, the asymmetricProperty trigger does not allow tuple
(x, y) existing with its asymmetric tuple (y, x).</p>
      <p>Note that if C(x, y1, . . . , yi, . . . , yn) is used in the physical relational schema
to represent functional property P (x, yi) from the canonical relational schema,
then all references to P (x, yi) in the rules are replaced by C(x, y1, . . . , yi, . . . , yn).
For instance, if as illustrated in the previous subsection, properties hasHusband
and hasSpouse are added as additional columns to table Woman and Person,
respectively, then references to hasHusband and hasSpouse are changed to Woman
and Person.
4</p>
      <p>Evaluation of SQOWL2
The SQOWL2 system can be evaluated in three steps. Firstly, in order to show
that the system is able to perform type inference over a large A-Box, three
benchmark ontologies are loaded into SQOWL2, and the total load and reasoning times
are reported. Secondly, in order to evaluate the reasoning completeness, we
compare the reasoning performance between SQOWL2 and two Tableaux reasoners.
Finally, we evaluate the performance of incremental consistency checking.
4.1</p>
      <p>
        Execution times of SQOWL2 over Large A-Boxes
Three example ontologies have been used to test and benchmark SQOWL2. The
first ontology has been produced by us, called the family ontology, improved
from [7] and formed by amalgamating fragments from the OWL 2 standard,
together with an A-Box generator. The family ontology benchmark used in the
evaluation provides four different ontologies with increasing size of A-Box:
family(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) contains an A-Box of 13,871 facts (i.e. class and property instances),
family(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) 40,854 facts, family(
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) 90,104 facts, and family(
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) 148,867 facts.
      </p>
      <p>
        The other two ontologies are the well known Lehigh University
Ontology Benchmark (LUBM) [4] and University Ontology Benchmark
(UOBM) [10]. To be more specific, LUBM(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ), which has about 100,000 facts,
is used in this evaluation. For the UOBM, the OWL-DL version is applied.
      </p>
      <p>SQOWL2 was used with Pellet for T-Box reasoning to produce tables and
triggers on a Microsoft SQL Server 2005 database, on a machine with 8 cores, 2
Intel Xeon E5345 2.33GHz CPUs, and 8GB of memory. The performance results
of type inference on family ontologies are shown in Figure 2. From the graphs,
it can be seen that SQOWL2 is able to perform transactional reasoning at an
average rate of 100 fact inserts per second for a 150,000 fact ontology, in the
process inferring an additional 300,000 facts. Since the ontology is very small,
the time taken for creating the database tables and triggers was only 0.6 seconds.
(a) Type Inference Time</p>
      <p>(b) Data Inference Amount</p>
      <p>SQOWL2 were also tested against the LUBM and UOBM benchmarks. These
two benchmarks contain only OWL 1 constructors; therefore, the benchmarks
are essentially testing less complex reasoning. The performance of reasoning is
shown in Table 1, from which is can be seen that SQOWL2 is able to process
over 150 inserts per second on average.</p>
      <p>Action LUBM UOBM
Loading T-Box 1.43s 1.42s
Classification 0.41s 0.64s
Building DB schema 0.38s 0.77s
Type inference 255.68s 1250.08s
Data facts in A-Box 100,543 260,580</p>
      <p>Facts in DB after reasoning 137,920 279,436
HermiT 1.3.6 and Pellet 2 are two Tableaux reasoners, which support reasoning
over OWL 2 DL. We expect Tableaux reasoners to provide more complete results
at the expense of execution time. To evaluate the reasoning efficiency and
completeness of SQOWL2, we compare the performance results between SQOWL2
and Tableaux reasoners in two ways: time spent on reasoning and the amount
of data after reasoning. The Wine ontology 2 is a more complicated OWL 1 DL
ontology, but does not come with any data generator (just around 500 A-Box
facts). In addition, a family ontology (family(0)) which contains a small A-Box
(1491 A-Box facts) is also used to show the performance of SQOWL2. The
comparison of reasoning (which includes classification and type inference)between
SQOWL2 and Hermit &amp; Pellet is illustrated in Figure 3. As expected, SQOWL2</p>
      <sec id="sec-24-1">
        <title>2 www.w3.org/TR/owl-guide/wine.rdf</title>
        <p>takes less time, but shows a very high reasoning completeness level. For wine
ontology, SQOWL2 only spent 10.2s on reasoning (Hermit uses 21.6s), but
generates 2277 A-Box instances which is 100% of the results found by Hermit. For
family ontology, the reasoning is more efficient and the completeness level is also
100%.
4.3 Incremental Consistency Checking of Adding Information
Incremental consistency checking happens when the A-Box is updated. In this
evaluation of incremental reasoning, we only focus on adding new individuals
and property tuples rather than the deleting or other update operations. To
illustrate, we could have a new A-Box fact hasWife(Lewis,Susan) added to the
family ontology. In Pellet, this fact can be added directly by a Pellet API, and the
incremental reasoning time of Pellet should be recorded. However, in SQOWL2,
ontologies are translated to database schema. Therefore, the new axiom can be
translated to a SQL insertion that,</p>
      </sec>
    </sec>
    <sec id="sec-25">
      <title>INSERT INTO Man VALUES ( ’ L e w i s ’ , ’ S u s a n ’ )</title>
      <p>
        By comparing the incremental consistency checking time of adding this axiom
using Pellet and the time to execute the above SQL statement. SQOWL2 shows
a very faster speed of incremental reasoning of adding information. Execution
times of such an insert on a fully populated version of the family(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) database
(i.e. one with 5,033 A-Box instances) are about 0.005s on the test system. By
contrast, Pellet needs about 9 seconds.
5
      </p>
      <p>Related Work
There are different kinds of DL reasoners. Tableaux reasoners which are using
tableaux algorithms, such as Pellet, Racer [5] and FacT++, are the most common
used, since they are efficient on classification of a T-Box and consistency checking
of an A-Box. However, they are not efficient at handling ontologies with a large
A-Box.</p>
      <p>Compared with Tableaux reasoners, there is an alternative way of performing
reasoning by using reasoning rules (rule based reasoning), in order to handle large
scale of ontologies. According to the description from the Introduction part,
rule based reasoning systems may be divided into VBR, TBR and application
based reasoner (ABR) [12] depending on the methods they used to implement
the rules. VBR systems, such as DLDB2 and DBOWL use SQL views to achieve
type inference, while SQOWL2, a TBR system applies SQL triggers to infer new
information based on OWL constructors. ABR systems, such as SOR [9, 16], uses
reasoners to implement type inference outside a DB.</p>
      <p>SOR (called Minerva previously), as an example of ABR, uses several tableaux
based reasoners to classify the T-Box first and then apply SQL statements to
apply description logic program rules, in order to implement its type inference
engine. It materialises reasoned ontologies inside an RDBMS, which shows a
faster querying process. However, current version of SOR only supports OWL
1 DL. Since it only maps a reasoned ontology into a relational schema. It does
not allow type inference inside the database; therefore, SOR does not support
transactional reasoning and incremental reasoning inside an RDBMS.</p>
      <p>Moreover, since in DBOWL, views are non-materialised, it cannot allow
queries running in the speed as SQOWL2, which materialised the inferred
information. In addition, VBR systems known to us do not support type inference on
OWL 2 DL features. For instance, DBOWL and DLDB2 both only cover OWL
1 DL features. Furthermore, SQOWL2 establishes a more traditional relational
schema which is a 3NF schema, by translating functional properties and key
properties as additional attributes to the properties’ domain tables.
6</p>
      <p>Conclusions
SQOWL2 is the first transactional reasoning system that supports sound
reasoning of OWL 2 DL, and which supports processing of reasoning over standard
relational schemas, where functional properties of a class are all held together
in a single relation. The evaluation shows that SQOWL2 is substantially faster
than Pellet and HermiT, yet provides result sets which are as complete for the
benchmark ontologies. It is also shown to be much faster at incremental
consistency checking, and since it materialises the reasoned data, is fast as query
processing. Of course, the approach is unsuited to applications were the inferred
data is very large, and queries are relatively infrequent compared to updates.</p>
      <p>Whilst other reasoners exist that are optimised for performance over large
A-Boxes, none of these support transactional reasoning, nor are effective at
incremental reasoning. Naturally, the advantages of SQOWL2 have to be balanced
with its disadvantages. Firstly, since the results of reasoning are being
materialised as data is inserted, certain applications might generate very large
materialised views from relatively small original datasets. Secondly, our work has not
yet addressed the key issue of handling deletes from the database effectively,
which is the subject of our current work.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>A.</given-names>
            <surname>Borgida</surname>
          </string-name>
          and
          <string-name>
            <given-names>R. J.</given-names>
            <surname>Brachman</surname>
          </string-name>
          .
          <article-title>Loading data into description reasoners</article-title>
          .
          <source>In ACM SIGMOD Record</source>
          , volume
          <volume>22</volume>
          , pages
          <fpage>217</fpage>
          -
          <lpage>226</lpage>
          . ACM,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>M. del Mar</surname>
            Roldan-Garcia and
            <given-names>J. F.</given-names>
          </string-name>
          <string-name>
            <surname>Aldana-Montes</surname>
          </string-name>
          .
          <article-title>Evaluating DBOWL: A Nonmaterializing OWL Reasoner based on Relational Database Technology</article-title>
          .
          <source>In OWL Reasoner Evaluation Workshop (ORE</source>
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>3. FacT++. http://owl.man.ac.uk/factplusplus/.</mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Y.</given-names>
            <surname>Guo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Pan</surname>
          </string-name>
          , and
          <string-name>
            <surname>J. Heflin.</surname>
          </string-name>
          <article-title>LUBM: A benchmark for OWL knowledge base systems</article-title>
          .
          <source>J. Web Sem</source>
          .,
          <volume>3</volume>
          (
          <issue>2</issue>
          -3):
          <fpage>158</fpage>
          -
          <lpage>182</lpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>V.</given-names>
            <surname>Haarslev</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Mo</surname>
          </string-name>
          <article-title>¨ller. Racer: A core inference engine for the semantic web</article-title>
          .
          <source>In Proceedings of the 2nd International Workshop on Evaluation of Ontology-based Tools</source>
          , volume
          <volume>87</volume>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>T.</given-names>
            <surname>Ha</surname>
          </string-name>
          <article-title>¨rder and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Reuter</surname>
          </string-name>
          .
          <article-title>Principles of Transaction-Oriented Database Recovery</article-title>
          .
          <source>ACM Comput. Surv.</source>
          ,
          <volume>15</volume>
          (
          <issue>4</issue>
          ):
          <fpage>287</fpage>
          -
          <lpage>317</lpage>
          ,
          <year>December 1983</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>P.</given-names>
            <surname>Hitzler</surname>
          </string-name>
          , M. Kro¨tzsch,
          <string-name>
            <given-names>B.</given-names>
            <surname>Parsia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. F.</given-names>
            <surname>Patel-Schneider</surname>
          </string-name>
          , and
          <string-name>
            <surname>S. Rudolph.</surname>
          </string-name>
          <article-title>OWL 2 web ontology language primer</article-title>
          .
          <source>W3C recommendation</source>
          ,
          <volume>27</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>123</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>M.</given-names>
            <surname>Horridge</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Bechhofer</surname>
          </string-name>
          .
          <article-title>The OWL API: a Java API for working with OWL 2 ontologies</article-title>
          .
          <source>Proc. of OWL Experiences and Directions</source>
          ,
          <year>2009</year>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>J.</given-names>
            <surname>Lu</surname>
          </string-name>
          , L. Ma, L. Zhang, J.-S. Brunner,
          <string-name>
            <given-names>C.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Pan</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Y.</given-names>
            <surname>Yu</surname>
          </string-name>
          .
          <article-title>SOR: a practical system for ontology storage, reasoning and search</article-title>
          .
          <source>In Proceedings of the 33rd international conference on Very large data bases</source>
          , pages
          <fpage>1402</fpage>
          -
          <lpage>1405</lpage>
          . VLDB Endowment,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. L. Ma,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Qiu</surname>
          </string-name>
          , G. Xie,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Pan</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Liu</surname>
          </string-name>
          .
          <article-title>Towards a Complete OWL Ontology Benchmark</article-title>
          .
          <source>In ESWC</source>
          , pages
          <fpage>125</fpage>
          -
          <lpage>139</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>P. McBrien</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Rizopoulos</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Smith.</surname>
          </string-name>
          <article-title>SQOWL: Type Inference in an RDBMS</article-title>
          .
          <source>Conceptual Modeling-ER</source>
          <year>2010</year>
          , pages
          <fpage>362</fpage>
          -
          <lpage>376</lpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>P. McBrien</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Rizopoulos</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Smith.</surname>
          </string-name>
          <article-title>Type inference methods and performance for data in an RDBMS</article-title>
          .
          <source>In Proceedings of the 4th International Workshop on Semantic Web Information Management, page 6. ACM</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>D. L. McGuinness</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Van Harmelen</surname>
          </string-name>
          , et al.
          <article-title>OWL web ontology language overview</article-title>
          .
          <source>W3C recommendation</source>
          ,
          <volume>10</volume>
          (
          <fpage>2004</fpage>
          -03):
          <fpage>10</fpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>Z.</given-names>
            <surname>Pan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , and
          <string-name>
            <surname>J. Heflin.</surname>
          </string-name>
          <article-title>DLDB2: A scalable multi-perspective semantic web repository</article-title>
          .
          <source>In Web Intelligence</source>
          , pages
          <fpage>489</fpage>
          -
          <lpage>495</lpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Pellet</surname>
          </string-name>
          . http://clarkparsia.com/pellet/.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>J. Zhou</surname>
            , L. Ma,
            <given-names>Q.</given-names>
          </string-name>
          <string-name>
            <surname>Liu</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Yu</surname>
            , and
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Pan. Minerva</surname>
          </string-name>
          :
          <article-title>A scalable OWL ontology storage and inference system</article-title>
          .
          <source>In The Semantic Web-ASWC</source>
          <year>2006</year>
          , pages
          <fpage>429</fpage>
          -
          <lpage>443</lpage>
          . Springer,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>