# Acquiring Ontology Axioms through Mappings to Data Sources +
## 1 Introduction
Without such flexibility, the designer would be forced to manually inspect the data sources and enrich the ontology off-line. Figure 2: OBDA with dynamic TBoxes virtualizing intensional and extensional information. The second issue is related to the need of meta-modeling constructs in the language used to specify the ontology [16; 17; 18; 19]. Meta-modeling allows concepts and relations to be conceived as first-order citizens and to see them as individuals that are instances of other concepts, called meta-concepts. By exploiting meta-modeling we might introduce in the ontology the meta-concept Car-Type, with Coupe, Sedan, etc. as its specializations. Note that the instances of such specialized concepts include the subconcepts of cars listed in the rows stored in table T-CarTypes. With this mechanism, the designer is allowed to specify the means for dynamically acquiring TBox axioms, through simple queries asking for the instances of the meta-concept Car-Type. Indeed, without the possibility of using meta-concepts in the ontology, it would be impossible to deal with the first issue mentioned above, that is exactly based on the idea of using mappings in order to transfer the knowledge fragments residing in the data sources to the TBox of the ontology. Note that for the technical development related to meta-modeling, we base our work on the approach and the results reported in [18]. In this paper, we deal with both the issue of acquiring TBox axioms from data sources and the issue of meta-modeling. In particular, we focus on designing tractable algorithms for query answering in such a setting. Indeed, looking for query answering algorithms that are tractable in data complexity is a distinguishing characteristic of OBDA systems. We follow [20], and we work with the _DL-Lite_ family of DLs, which enjoys the first-order logic (FOL) rewritability properties. In a DL, enjoying such property answering (unions) of conjunctive queries can be done in two steps. The first one, called rewriting, uses the TBox axioms in order to transform the query \(q\) into a new FOL query \(q^{\prime}\). The second step evaluates \(q^{\prime}\) over the ABox seen as a database. The challenge we face in this paper is to design tractable query answering algorithms even in cases where the mapping assertions map the data at the sources to both the extensional and the intensional level of the ontology and both meta-concepts and meta-relations are used in the queries. In particular, we present the following contributions. * We formalize the notion of _mapping-based knowledge base_ (MKB), that captures the idea of acquiring the axioms of both the extensional and the intensional level of the ontology through mapping assertions linking the source data to the ontology. This mechanism allows the designer to achieve a level of flexibility that is not possible in current OBDA systems. Our formalization relies on the notion of higher-order DL, as introduced in [18]. Indeed, [PERSON] et al. [18] describe a  
Figure 3: The database \(\mathcal{D}\) (from [15]). methodology that, starting from a traditional DL \(\mathcal{L}\), allows one to define its higher-order version \(Hi(\mathcal{L})\). Here, we apply this idea and make use of the higher-order DL \(Hi(\textit{DL-Lite}_{\mathcal{R}})\). * We propose to query mapping-based knowledge bases by means of an extension of unions of conjunctive queries (UCQs), taking advantage of the higher-order features of \(Hi(\textit{DL-Lite}_{\mathcal{R}})\). In particular we define a suitable class of such queries, the so-called _instance_ higher-order UCQs (IHUCQs), enjoying nice computational properties. The basic characteristic of IHUCQs is to allow higher-order features (i.e., meta-concepts and meta-properties) in the query expression but to disregard subclass and subproperty assertions in the body of the query. * We study the problem of answering IHUCQs posed to MKBs expressed in \(Hi(\textit{DL-Lite}_{\mathcal{R}})\). We show that this problem is efficiently solvable by exhibiting an algorithm based on FOL rewriting.