
Optimizing Query Rewriting in Ontology-Based Data Access Floriana Di Pinto, Domenico Lembo, Maurizio Lenzerini, Riccardo Mancini, Antonella Poggi, Riccardo Rosati, Marco Ruzzi, and Domenico Fabio Savo DIAG, Sapienza Università di Roma <lastname>@dis.uniroma1.it ABSTRACT data stored in different sources and the processes operating over In ontology-based data access (OBDA), an ontology is connected to them tend to be redundant, and mutually inconsistent, mainly be- autonomous, and generally pre-existing, data repositories through cause of the lack of central, coherent and unified coordination of mappings, so as to provide a high-level, conceptual view over such data management tasks. data. User queries are posed over the ontology, and answers are All the above observations show that a unified access to data computed by reasoning both on the ontology and the mappings. and an effective governance of data are extremely difficult goals to Query answering in OBDA systems is typically performed through achieve in modern information systems. Yet, both are crucial ob- a query rewriting approach which is divided into two steps: (i) the jectives for getting useful information out of the information sys- query is rewritten with respect to the ontology (ontology rewriting tem. This explains why organizations spend a great deal of time of the query); (ii) the query thus obtained is then reformulated over and money for the understanding, the governance, the curation, and the database schema using the mapping assertions (mapping rewrit- the integration of data stored in different sources, and of the pro- ing of the query). In this paper we present a new approach to the cesses/services that operate on them, and why this problem is often optimization of query rewriting in OBDA. The key ideas of our ap- cited as a key and costly Information Technology challenge faced proach are the usage of inclusion between mapping views and the by medium and large organizations today [1]. usage of perfect mappings, which allow us to drastically lower the Ontology-based data access [16] (OBDA) is a promising direc- combinatorial explosion due to mapping rewriting. These ideas are tion for addressing the above challenges. OBDA is a new paradigm formalized in PerfectMap, an algorithm for OBDA query rewrit- for accessing data, whose key idea is to resort to a three-level ar- ing. We have experimented PerfectMap in a real-world OBDA chitecture, constituted by the ontology, the data sources, and the scenario: our experimental results clearly show that, in such a sce- mapping between the two. The ontology is a formal description of nario, the optimizations of PerfectMap are crucial to effectively the domain of interest, and is the heart of the whole system. The perform query answering. data sources are the repositories used in the organization by the var- ious processes and the various applications. The mapping layer ex- plicitly specifies the relationships between the domain concepts on 1. INTRODUCTION the one hand and the data sources on the other hand. Notice that, While the amount of data managed by current information sys- the ontology and the corresponding mappings to the data sources tems and the processes acting on such data continuously grow, turn- provide a common ground for the documentation of all the data in ing these data into information, and governing both data and pro- the organization, with clear advantages for the governance and the cesses are still tremendously challenging tasks for even small orga- management of the information system. nizations. The problem is complicated by the proliferation of both In this sense, OBDA can be seen as a form of information in- data sources and services that are relevant for the organization. Sev- tegration, where the usual global schema is replaced by the con- eral factors combine to explain why such a proliferation constitutes ceptual model of the domain of interest, formulated as an ontology a major problem with respect to the goal of carrying out effective expressed in a logic-based language. With this approach, the in- data governance tasks. Firstly, the data sources are often created for tegrated view that an OBDA system provides to information con- serving specific applications, and they lack mechanisms for com- sumers is not merely a data structure accommodating the various paring, combining, and reconciling their content with the one of data at the sources, but a semantically rich description of the rele- other data sources. Secondly, it is common practice to change vant concepts in the domain of interest, as well as the relationships a data source (e.g., a database) so as to adapt it both to specific (called “roles”) between such concepts. As in information inte- application-dependent needs, or to new requirements, with little or gration, one of the most important tasks that an OBDA system is no attention to keeping the documentation up-to-date. Finally, the required to carry out is to allow a client to query the data through the global unified view represented by the ontology. Such task is the focus of this paper. In particular, it is the responsibility of the OBDA system to compute the answer to the queries posed in terms Permission to make digital or hard copies of all or part of this work for of the ontology. Such queries are expressions that use the predi- personal or classroom use is granted without fee provided that copies are cates defined in the ontology, and should be answered by reasoning not made or distributed for profit or commercial advantage and that copies on the ontology and on the mappings, and by accessing the appro- bear this notice and the full citation on the first page. To copy otherwise, to priate data sources to collect the correct data to return to the client. republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Query answering in OBDA is currently a hot research topic (see EDBT/ICDT ’13 March 18 - 22 2013, Genoa, Italy e.g., [5, 19, 4, 13, 2, 9]). One of the outcomes of this research is a Copyright 2013 ACM 978-1-4503-1597-5/13/03 ...$15.00. 561 detailed study of the complexity of query answering. In particular, While in recent years we have seen many approaches to the on- the study of OBDA has focused on understanding which languages tology rewriting step and its optimizations, (see, e.g., [5, 22, 23, for the ontology and for the mappings allow query answering to be 9]), very little has been done towards the optimization the mapping performed with reasonable computational complexity with respect rewriting step. Note that mapping rewriting is also relevant in data to the size of the data. It is now well known that query answering integration. However, the literature on data integration has mainly can be performed efficiently only if (i) the ontology is expressed in focused on the LAV approach to mappings [17, 20, 12], where a lightweight ontology language, and (ii) the mappings are of type mapping rewriting is a form of view-based query rewriting, a well- GAV (Global-As-View) [6]. We remind the reader that, while in known NP-complete problem. Differently, query answering under the LAV (Local-As-View) approach, every data source is described GAV mappings does not suffer from the intractability problem, and in terms of a view over the ontology, in the GAV approach, the data has been considered somehow trivial. Indeed, a naive approach sources are mapped to the ontology by associating to each predicate to GAV mapping rewriting consists of grouping all SQL queries in the ontology a query over the data sources [15]. Notably, it has mapping the same ontology concept (or role) to the database into a been shown that, with lightweight ontology languages, and with single query, in such a way that such single query becomes a view GAV mappings, conjunctive queries are first-order rewritable, i.e., constituted by the union of all original SQL queries. After this step, answering (unions of) conjunctive queries ((U)CQs) expressed over performing the mapping rewriting of an ontology query is trivial, the ontology can be reduced to the evaluation of a suitable first- since every concept and role can be simply rewritten in terms of order query (called the perfect rewriting of the original query, and the database view associated with it by the mappings. This method computed on the basis of the original query, the ontology, and the produces a compact final SQL query to be sent to the sources, i.e., mapping) expressed over the data sources. an SQL query of size polynomial with respect to the input of the The problem. As we said before, many recent papers on OBDA mapping rewriting step. Unfortunately, this approach is unfeasible have concentrated on understanding how reasoning on the ontol- in practice, since, even under relatively simple mappings and un- ogy affects the process of query answering. For this reason, most der empty ontologies, the final queries to be executed at the source of them refer to a simplified framework of OBDA, in which the database are too complex to be handled by current SQL engines. data sources are constituted by ad-hoc data stores accommodating This is due to the fact that such engines are not able to optimize the the instances of the concepts and the relationships of the ontology. execution of queries with complex nested expressions, such as the Obviously, in such a simplified setting, mappings reduce to direct ones using views with complex unions. correspondences between the ontology predicates and the tables in The conclusion is that grouping all mappings relative to the same the data stores, and do not pose any challenge to query answering.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages12 Page
-
File Size-