---
title: Deductive Ontology Bases (DOBs) Overview
url: https://www.emergentmind.com/topics/deductive-ontology-bases-dobs
type: topic
---

# Deductive Ontology Bases (DOBs) Overview

Searching arXiv for the cited DOB-related papers and closely related Semantic Web/deductive database work.
A Deductive Ontology Base (DOB) is a deductive-database formalization of an ontology in which explicit ontology assertions are represented as facts and ontology axioms are represented as inference rules. In the formulation introduced for Web ontology query processing, an ontology knowledge base $O=\langle \mathcal{F},\mathcal{I}\rangle$ is modeled as a Datalog program partitioned into an Extensional Ontology Base (EOB), containing ground predicates corresponding to $\mathcal{F}$, and an Intensional Ontology Base (IOB), containing Datalog rules corresponding to $\mathcal{I}$ [0711.2087]. In later hybrid-database work, the notion is broadened into a tuple $\mathit{DOB}=(\Sigma,R,O,\tau)$ that combines a Datalog rule base, an OWL/SWRL ontology, and a translation $\tau$ that compiles ontology axioms into Datalog facts or rules for uniform reasoning inside a deductive engine [1701.00622]. Across these formulations, the defining idea is the same: ontological knowledge is flattened into a rule-based substrate so that query answering, optimization, explanation, and cross-source integration can be handled within deductive-database machinery.

## 1. Formal characterization

In the Web ontology query-processing formulation, a DOB is a pair $(\mathrm{EOB},\mathrm{IOB})$ in which every EOB predicate is a ground $n$-ary predicate whose extension is known a priori, and every IOB predicate is defined by one or more Datalog rules of the form
$$
\forall \bar{X},\bar{Y}.\ q(\bar{X}) :\!-\; B_1(\bar{X},\bar{Y}),\dots,B_k(\bar{X},\bar{Y}).
$$
Here $\bar{X}$ are head variables and $\bar{Y}$ are variables appearing only in the body [0711.2087]. Valid instantiations are substitutions mapping variables to constants that make all body atoms true in the minimal model; these instantiations generate intermediate inferred facts. This model places ontology querying squarely in the setting of deductive databases, with explicit separation between stored assertions and inferred consequences.

The EOB/IOB split is exemplified by predicates such as `isClass(C,O)`, `subClassOf(C₁,C₂)`, `isOProperty(P,Dom,Range)`, `isDProperty(P,Dom)`, `isIndividual(I,C)`, and `isStatement(I,P,J)` for the extensional layer, alongside recursive intensional predicates such as `areSubClasses`, `areImpOntologies`, `areClasses`, and `areIndividuals` [0711.2087]. For example, transitive subclass closure is expressed by the two rules
$$
\forall C_1,C_2.\ \mathit{areSubClasses}(C_1,C_2) :\!-\; \mathit{subClassOf}(C_1,C_2).
$$
$$
\forall C_1,C_3,C_2.\ \mathit{areSubClasses}(C_1,C_2) :\!-\; \mathit{subClassOf}(C_1,C_3),\mathit{areSubClasses}(C_3,C_2).
$$
This illustrates that a DOB is not merely a storage format; it is a deductive theory whose operational behavior depends on the evaluation of recursive rules.

In the hybrid deductive-database formulation, the DOB is generalized as
$$
\mathit{DOB}=\bigl(\Sigma,R,O,\tau\bigr),
$$
where $\Sigma$ is a many-sorted first-order signature, $R$ is a finite Datalog rule base, $O$ is a finite set of ontology axioms in an OWL/SWRL fragment, and $\tau$ maps ontological axioms into Datalog facts or rules over $\Sigma$ [1701.00622]. The resulting flattened rule base is
$$
D=(R\cup \tau(O)).
$$
This formulation makes explicit that ontological knowledge is not handled by a separate reasoner in the core execution model; instead, ontology axioms are translated into the same rule language as the rest of the deductive program.

A plausible implication is that the two definitions describe different points on a spectrum rather than incompatible notions. The earlier EOB/IOB account emphasizes efficient query evaluation over OWL Lite ontologies, whereas the later tuple-based definition emphasizes heterogeneous integration, provenance, and explanation.

## 2. Representation of ontology semantics in Datalog

A DOB models ontology semantics by encoding ontological constructs as facts and Datalog rules. In the OWL Lite setting, import closure, class inheritance across imported ontologies, and inheritance of individuals along subclass hierarchies are all represented as recursive intensional predicates [0711.2087]. For example, import closure is captured by
$$
\forall O_1,O_2.\ \mathit{areImpOntologies}(O_1,O_2) :\!-\; \mathit{impOntology}(O_1,O_2).
$$
$$
\forall O_1,O_3,O_2.\ \mathit{areImpOntologies}(O_1,O_2) :\!-\; \mathit{impOntology}(O_1,O_3),\mathit{areImpOntologies}(O_3,O_2).
$$
Inheritance of classes via imports and inheritance of individuals via subclass entailment are then expressed with further rules over these closures. The result is a rule-theoretic encoding of ontology reasoning that can be evaluated through standard deductive techniques.

The later hybrid formulation makes the translation step explicit. Under $\tau$, class inclusion $C_1\sqsubseteq C_2$ is mapped to the Datalog rule
$$
C_2(x)\leftarrow C_1(x),
$$
property inclusion $P_1\sqsubseteq P_2$ is mapped to
$$
P_2(x,y)\leftarrow P_1(x,y),
$$
domain axioms are translated to rules of the form
$$
C(x)\leftarrow P(x,y),
$$
range axioms to
$$
C(y)\leftarrow P(x,y),
$$
and SWRL implications
$$
\mathit{Implies}(\{\alpha_1,\dots,\alpha_k\},\{\beta\})
$$
are translated to
$$
\beta\leftarrow \alpha_1,\dots,\alpha_k
$$
[1701.00622]. This encoding strategy places OWL/SWRL fragments and conventional Datalog rules into a single inferential space.

A worked example in the hybrid account combines an OWL axiom $\mathit{Parent}\sqsubseteq \mathit{Ancestor}$, a DL fact $\mathit{Parent}(\mathit{alice},\mathit{bob})$, a SWRL rule for `uncle`, and a Datalog fact $\mathit{Brother}(\mathit{bob},\mathit{charlie})` [1701.00622]. After translation, the program derives both $\mathit{Ancestor}(\mathit{alice},\mathit{bob})$ and $\mathit{uncle}(\mathit{alice},\mathit{charlie})`. This demonstrates the central operational property of a DOB: ontology-derived and rule-derived consequences participate in the same derivation process.

This suggests that a DOB is best understood not as an ontology language but as a compilation and execution discipline. Its semantics arise from how ontology axioms are embedded into the deductive substrate and from the evaluation strategy applied to the resulting program.

## 3. Query evaluation and cost-based optimization

The principal technical contribution of the query-processing work is a cost-based optimization technique for conjunctive queries over DOBs that minimizes the number of intermediate inferred facts [0711.2087]. This objective is specific to deductive ontology querying: inferred facts can dominate execution cost, especially when intensional predicates encode transitive closure or other recursive entailments.

The proposed cost model is hybrid. For intensional predicates in the IOB, cardinality and cost are estimated using adaptive sampling; for extensional predicates in the EOB and for conjunctive ontology queries, techniques from traditional relational cost models are used [0711.2087]. The adaptive-sampling component considers the population of valid instantiations of an intensional predicate, partitions it according to a chosen argument, and estimates the expectation of a random variable $Y$ representing either cardinality contribution or derivation cost. The estimator $\hat{Y}$ is required to satisfy
$$
P[|\hat{Y}-E[Y]|\le d\cdot E[Y]]\ge p,
$$
with
$$
\alpha=\frac{d(d+1)}{1-\sqrt{p}}.
$$
Sampling proceeds until the cumulative sum $z$ exceeds a bound based on $\alpha$ and an upper bound $b(n)$ estimated from pilot samples; the sample mean $\hat{Y}=z/m$ is then scaled by the number of partitions to estimate predicate cardinality [0711.2087].

For joins, the model adopts System R-style formulas. For two subgoals $P_1$ and $P_2$,
$$
\mathit{card}(P_1\Join P_2)=\mathit{card}(P_1)\cdot \mathit{card}(P_2)\cdot RF(P_1,P_2),
$$
where $RF$ is a reduction factor computed under uniformity and independence assumptions on join variables [0711.2087]. Cost estimates are given for nested-loop join, block nested-loop join, and hash join. In the nested-loop case,
$$
\mathit{cost}(P_1\Join P_2)=\mathit{cost}(P_1)+\mathit{card}(P_1)\cdot \mathit{cost}^{inst}(P_2).
$$
For block nested-loop join,
$$
\mathit{cost}(P_1\Join P_2)=\mathit{cost}(P_1)+\left\lceil \frac{\mathit{card}(P_1)}{\mathit{BlockSize}}\right\rceil\cdot \mathit{cost}(P_2),
$$
and for hash join,
$$
\mathit{cost}(P_1\Join P_2)=\mathit{cost}(P_1)+\mathit{cost}(P_2).
$$
For larger conjunctions, the formulas are applied pairwise according to the chosen plan.

A concrete query example asks which ontology $O$ has a class $C$ with a traction property:
$$
q(O) :\!-\; \mathit{areClasses}(C,O),\mathit{isDProperty}(\mathit{traction},C).
$$
Two join orders are compared: evaluating `areClasses(C,O)` before `isDProperty(traction,C)`, or vice versa. The reported sampling result is that the second plan produces far fewer intermediate facts because `isDProperty(traction,–)` has selectivity 1 [0711.2087]. The example illustrates the core intuition of DOB optimization: highly selective extensional predicates should constrain recursive intensional predicates as early as possible.

## 4. Plan generation and search-space pruning

DOB query optimization is implemented by a dynamic-programming algorithm that enumerates conjunctive query plans and retains only partial plans that are not dominated in both cost and cardinality [0711.2087]. The algorithm constructs `SubPaths_i`, the set of best partial plans of length $i$, and extends each subpath only with predicates that share variables with the current subplan. For each equivalence class of plans containing the same set of subgoals, the algorithm keeps only those plans for which no alternative has both lower cost and lower cardinality.

The pruning criterion is Pareto dominance. Since the objective is to minimize intermediate inferred facts while preserving awareness of result sizes, both estimated cost and estimated cardinality are used in dominance checks [0711.2087]. This is important in DOB settings because low immediate cost can lead to high downstream expansion if a plan produces large intermediate inferred relations.

The dynamic-programming formulation is structurally similar to classical relational join-order optimization, but its semantics are tuned to deductive inference. In particular, the estimated cost of a partial plan is not simply an I/O or CPU proxy; it is explicitly the accumulation of intermediate inferred facts produced during join steps [0711.2087]. This redefinition of the optimization target differentiates DOB planning from purely relational planning.

A plausible implication is that the DOB framework transfers mature ideas from relational query optimization into ontology-aware deductive settings without assuming that relational access costs alone are adequate. The hybrid model compensates for this by separating the treatment of extensional and intensional predicates.

## 5. Experimental evaluation and empirical behavior

The reported experimental study modeled a subset of OWL Lite as a DOB and evaluated the cost model and optimization method on synthetic and real-world ontologies [0711.2087]. The real-world OWL-Lite ontologies named are Travel, EHR_RM, and GALEN. The measured metrics were the number of intermediate inferred facts and wall-clock time. Sampling and confidence parameters were fixed at $d=0.2$, $p=0.7$, and $k=7$.

The predictive capacity of the cost model was evaluated by correlation between estimated and actual cost. The reported values are approximately $\rho\approx 0.92$ for synthetic ontologies under nested-loop joins only, $\rho\approx 0.62$ for GALEN under nested-loop joins only, $\rho\approx 0.96$ for Travel under nested-loop joins and $\rho\approx 0.94$ for Travel across all three join strategies, and $\rho\approx 0.98$ for EHR_RM under nested-loop joins and $\rho\approx 0.92$ for EHR_RM across all three strategies [0711.2087]. These figures indicate that predictive accuracy varied by ontology, with GALEN showing substantially weaker correlation than the other reported cases.

Optimization benefits were expressed as cost ratios. For synthetic queries under nested-loop joins, $\mathit{cost}_{opt}/\mathit{cost}_{worst}<10\%$ in most cases. Across 20 queries, $\mathit{cost}_{opt}/\mathit{cost}_{med}<40\%$ for 15 queries. On EHR_RM, the mean $\mathit{cost}_{opt}/\mathit{cost}_{worst}$ under nested-loop joins is given as approximately $0.10$, and approximately $0.07$ when all three join strategies are available [0711.2087]. The study concludes that the techniques are accurate and improve query performance.

These results support a limited but concrete claim: within the evaluated OWL Lite subset, minimizing intermediate inferred facts through DOB-aware optimization substantially affects execution behavior. This does not establish universal performance guarantees, but it does show that the optimization problem is practically consequential.

## 6. Hybrid systems, dependency analysis, and proof trees

In the DDbase-oriented account, the DOB concept is extended beyond ontology query optimization to knowledge engineering over heterogeneous sources [1701.00622]. DDbase is described as combining four knowledge sources: a relational-database component accessed via ODBC-style calls, an XML/OWL store queried via the FnQ engine, a Datalog rule base stored as Prolog clauses, and an ontology base of OWL/SWRL axioms translated by $\tau$ into Datalog facts and rules. These four components are interconnected through a unified query language described as essentially Datalog with embedded Prolog calls and FnQ path-expressions.

Two graph abstractions are used to analyze the combined program $R\cup \tau(O)$: the predicate-dependency graph $G_P^d$ and the rule-predicate graph $G_P^{rg}$ [1701.00622]. In the predicate-dependency graph, vertices are predicate symbols and an edge $(p,q)$ is present whenever a rule with head predicate $p$ contains a body literal with predicate $q$. The rule-predicate graph refines this by introducing nodes for rules as well as predicates, with edges from head predicates to rules and from rules to body predicates; default-negated body literals are marked as “not-edges.” The example contrasting
$$
P_1=\{r_1:p\leftarrow q_1,\ r_2:p\leftarrow q_2\}
$$
with
$$
P_2=\{r_3:p\leftarrow q_1,q_2\}
$$
shows that the two programs have the same predicate-dependency graph but different rule-predicate graphs [1701.00622]. In DOBs, this distinction matters because ontology translations may preserve coarse predicate dependencies while altering the rule-level structure of derivations.

The same work emphasizes proof-tree based reasoning. A semi-naive bottom-up operator is extended so that each derived atom is paired with a proof term recording the rule name and the proof trees of its premises [1701.00622]. Starting from
$$
E_0=\{(f,t(f,\mathit{fact}(f)))\mid f\in \mathit{EDB}\},
$$
one adds
$$
\bigl(A\theta,\ t(A\theta,r,T_1,\dots,T_m)\bigr)
$$
whenever $r:A\leftarrow B_1,\dots,B_m$ and each $(B_i\theta,T_i)$ is available at the current stage. After fixpoint, $E_\infty$ contains all derived atoms paired with their canonical proof trees. This mechanism is presented as an explanation facility for hybrid derivations mixing rules, ontology axioms, built-ins, and path queries.

The same machinery is applied to version comparison. Two DOB versions
$$
\mathit{DOB}_1=(R_1,O_1,\tau_1),\qquad \mathit{DOB}_2=(R_2,O_2,\tau_2)
$$
may be compared through predicate-dependency graphs, rule-predicate graphs, and proof-tree differencing [1701.00622]. This extends the DOB idea from efficient reasoning to maintenance and evolution analysis in hybrid knowledge bases.

## 7. Scope, misconceptions, and limitations

A common misconception is that a DOB is simply another name for an ontology stored in a database. The source material instead defines it as a deductive representation in which inference axioms are first-class components of the database program itself [0711.2087]. The distinction is substantive: query cost, plan quality, and explanation behavior all depend on how recursive and inferred predicates are evaluated.

A second misconception is that DOBs are tied exclusively to OWL Lite. The query-evaluation work specifically models a subset of OWL Lite as a DOB [0711.2087], but the later DDbase-oriented work explicitly extends the setting to OWL/SWRL fragments and mixed-source hybrid deductive databases [1701.00622]. This suggests a family resemblance across systems rather than a single fixed ontology language boundary.

The DDbase-oriented account also states explicit limitations. Materializing OWL entailments as Datalog rules may explode in size for very expressive DL axioms beyond OWL-Lite; recursion through SWRL combined with built-ins may threaten termination under bottom-up evaluation; optimization across relational, XML, and rule-based accesses remains an open challenge; and certain DL constructs such as cardinality constraints and nominals, as well as advanced provenance inferences such as cycle-detection in OPM, cannot be completely unfolded into pure Datalog without extra machinery [1701.00622]. These are not incidental engineering caveats; they identify the boundary conditions under which the DOB approach remains tractable.

Taken together, the literature presents DOBs as a deductive formalism for ontological knowledge that is simultaneously representational and operational. In one line of work, the emphasis is cost-based optimization for conjunctive query evaluation over intensional and extensional ontology predicates [0711.2087]. In another, the emphasis is hybrid knowledge engineering, provenance, graph-based abstraction, and proof-carrying derivation in a unified deductive engine [1701.00622]. The shared foundation is the translation of ontology semantics into a deductive program whose facts, rules, derivations, and query plans can all be analyzed using deductive-database techniques.

Source: https://www.emergentmind.com/topics/deductive-ontology-bases-dobs