Abstract
Ontological queries are evaluated against a knowledge base consisting of an extensional database and an ontology (i.e., a set of logical assertions and constraints that derive new intensional knowledge from the extensional database), rather than directly on the extensional database. The evaluation and optimization of such queries is an intriguing new problem for database research. In this article, we discuss two important aspects of this problem: query rewriting and query optimization. Query rewriting consists of the compilation of an ontological query into an equivalent first-order query against the underlying extensional database. We present a novel query rewriting algorithm for rather general types of ontological constraints that is well suited for practical implementations. In particular, we show how a conjunctive query against a knowledge base, expressed using linear and sticky existential rules, that is, members of the recently introduced Datalog± family of ontology languages, can be compiled into a union of conjunctive queries (UCQ) against the underlying database. Ontological query optimization, in this context, attempts to improve this rewriting process soas to produce possibly small and cost-effective UCQ rewritings for an input query.
Supplemental Material
Available for Download
Supplemental movie, appendix, image and software files for, Query Rewriting and Optimization for Ontological Databases
- Serge Abiteboul, Richard Hull, and Victor Vianu. 1995. Foundations of Databases. Addison-Wesley. Google ScholarDigital Library
- Andrea Acciarri, Diego Calvanese, Giuseppe De Giacomo, Domenico Lembo, Maurizio Lenzerini, Mattia Palmieri, and Riccardo Rosati. 2005. QuOnto: Querying ontologies. In Proceedings of the 20th National Conference on Artificial Intelligence and the 17th Innovative Applications of Artificial Intelligence Conference. 1670--1671. Google ScholarDigital Library
- Miklos Ajtai and Yuri Gurevich. 1989. Datalog vs. first-order logic. In Proceedings of the 30th Annual Symposium on Foundations of Computer Science. 142--147. Google ScholarDigital Library
- Hajnal Andreka, Johan van Benthem, and Istvan Nemeti. 1998. Modal languages and bounded fragments of predicate logic. J. Philos. Logic 27, 217--274.Google ScholarCross Ref
- Franz Baader. 2003. Least common subsumers and most specific concepts in a description logic with existential restrictions and terminological cycles. In Proceedings of the 18th International Joint Conference on Artificial Intelligence. 319--324. Google ScholarDigital Library
- Franz Baader, Diego Calvanese, Deborah L. McGuinness, Daniele Nardi, and Peter F. Patel-Schneider, Eds. 2003. The Description Logic Handbook: Theory, Implementation, and Applications. Cambridge University Press. Google ScholarDigital Library
- Jean-Francois Baget, Michel Leclere, Marie-Laure Mugnier, and Eric Salvat. 2011. On rules with existential variables: Walking the decidability line. Artif. Intell. 175, 9--10, 1620--1654. Google ScholarDigital Library
- Catriel Beeri and Moshe Y. Vardi. 1981. The implication problem for data dependencies. In Proceedings of the 8th International Colloquium on Automata, Languages and Programming. 73--85. Google ScholarDigital Library
- Michael Benedikt, Balder Ten Cate, and Efthymia Tsamoura. 2014. Generating low-cost plans from proofs. In Proceedings of the 33rd ACM Symposium on Principles of Database Systems. 200--211. Google ScholarDigital Library
- Barry Bishop and Florian Fischer. 2008. IRIS - Integrated rule inference system. In Proceedings of the International Workshop on Advancing Reasoning on the Web: Scalability and Commonsense.Google Scholar
- Philip Bohannon, Eiman Elnahrawy, Wenfei Fan, and Michael Flaster. 2006. Putting context into schema matching. In Proceedings of the 32nd International Conference on Very Large Data Bases. 307--318. Google ScholarDigital Library
- Loreto Bravo, Wenfei Fan, and Shuai Ma. 2007. Extending dependencies with conditions. In Proceedings of the 33rd International Conference on Very Large Data Bases. 243--254. Google ScholarDigital Library
- Andrea Cali, Domenico Lembo, and Riccardo Rosati. 2003. Decidability and complexity of query answering over incosistent and incomplete databases. In Proceedings of the 22nd ACM Symposium on Principles of Database Systems. 260--271. Google ScholarDigital Library
- Andrea Cali, Georg Gottlob, and Michael Kifer. 2008. Taming the infinite chase: Query answering under expressive relational constraints. In Proceedings of the 11th International Conference on Principles of Knowledge Representation and Reasoning. 70--80.Google Scholar
- Andrea Cali, Georg Gottlob, Thomas Lukasiewicz, and Andreas Pieris. 2011. A logical toolbox for ontological reasoning. SIGMOD Rec. 40, 3, 5--14. Google ScholarDigital Library
- Andrea Cali, Georg Gottlob, and Thomas Lukasiewicz. 2012a. A general Datalog-based framework for tractable query answering over ontologies. J. Web Semant. 14, 57--83. Google ScholarDigital Library
- Andrea Cali, Georg Gottlob, and Andreas Pieris. 2012b. Towards more expressive ontology languages: The query answering problem. Artif. Intell. 193, 87--128. Google ScholarDigital Library
- Andrea Cali, Georg Gottlob, and Michael Kifer. 2013. Taming the infinite chase: Query answering under expressive relational constraints. J. Artif. Intell. Res. 48, 115--174. Google ScholarDigital Library
- Diego Calvanese, Giuseppe De Giacomo, Domenico Lembo, Maurizio Lenzerini, and Riccardo Rosati. 2007. Tractable reasoning and efficient query answering in description logics: The DL-Lite family. J. Autom. Reason. 39, 3, 385--429. Google ScholarDigital Library
- Diego Calvanese, Giuseppe De Giacomo, Domenico Lembo, Maurizio Lenzerini, and Riccardo Rosati. 2013a. Data complexity of query answering in description logics. Artif. Intell. 195, 335--360. Google ScholarDigital Library
- Diego Calvanese, Giuseppe De Giacomo, Domenico Lembo, Maurizio Lenzerini, and Riccardo Rosati. 2013b. Data complexity of query answering in description logics. Artif. Intell. 195, 335--360. Google ScholarDigital Library
- Ashok K. Chandra and Philip M. Merlin. 1977. Optimal implementation of conjunctive queries in relational data bases. In Proceedings of the 9th Annual ACM Symposium on Theory of Computing. 77--90. Google ScholarDigital Library
- Ashok K. Chandra and Moshe Y. Vardi. 1985. The implication problem for functional and inclusion dependencies. SIAM J. Comput. 14, 671--677.Google ScholarCross Ref
- Chandra Chekuri and Anand Rajaraman. 2000. Conjunctive query containment revisited. Theor. Comput. Sci. 239, 2, 211--229. Google ScholarDigital Library
- Alexandros Chortaras, Despoina Trivela, and Giorgos B. Stamou. 2011. Optimized query rewriting for owl 2 ql. In Proceedings of the 23rd International Conference on Automated Deduction. 192--206. Google ScholarDigital Library
- Carlo Curino, Hyun Jin Moon, Alin Deutsch, and Carlo Zaniolo. 2013. Automating the database schema evolution process. VLDB J. 22, 1, 73--98. Google ScholarDigital Library
- Alin Deutsch, Alan Nash, and Jeff B. Remmel. 2008. The chase revisisted. In Proceedings of the 27th ACM Symposium on Principles of Database Systems. 149--158. Google ScholarDigital Library
- Alin Deutsch, Lucian Popa, and Val Tannen. 1999. Physical data independence, constraints, and optimization with universal plans. In Proceedings of the 25th International Conference on Very Large Data Bases. 459--470. Google ScholarDigital Library
- Alin Deutsch and Val Tannen. 2003. MARS: A system for publishing xml from mixed and redundant storage. In Proceedings of the 29th International Conference on Very Large Data Bases. 201--212. Google ScholarDigital Library
- Ronald Fagin, Phokion G. Kolaitis, Renee J. Miller, and Lucian Popa. 2005. Data exchange: Semantics and query answering. Theor. Comput. Sci. 336, 1, 89--124. Google ScholarDigital Library
- Haim Gaifman, Harry G. Mairson, Yehoshua Sagiv, and Moshe Y. Vardi. 1993. Undecidable optimization problems for database logic programs. J. ACM 40, 3, 683--713. Google ScholarDigital Library
- Georg Gottlob, Stanislav Kikot, Roman Kontchakov, Vladimir Podolskii, Thomas Schwentick, and Michael Zakharyaschev. 2014. The price of query rewriting in ontology-based data access. Artif. Intell. 213, 42--59.Google ScholarDigital Library
- Georg Gottlob, Nicola Leone, and Francesco Scarcello. 2002. Hypertree decompositions and tractable queries. J. Comput. Syst. Sci. 64, 3, 579--627. Google ScholarDigital Library
- Georg Gottlob, Giorgio Orsi, and Andreas Pieris. 2011. Ontological queries: Rewriting and optimization. In Proceedings of the 27th International Conference on Data Engineering. 2--13. Google ScholarDigital Library
- Georg Gottlob and Thomas Schwentick. 2012. Rewriting ontological queries into small nonrecursive datalog programs. In Proceedings of the 13th International Conference on Principles of Knowledge Representation and Reasoning.Google Scholar
- Alon Y. Halevy. 2001. Answering queries using views: A survey. VLDB J. 10, 4, 270--294. Google ScholarDigital Library
- Martha Imprialou, Giorgos Stoilos, and Bernardo Cuenca Grau. 2012. Benchmarking ontology-based query rewriting systems. In Proceedings of the 26th AAAI Conference on Artificial Intelligence. 779--785.Google Scholar
- David S. Johnson and Anthony C. Klug. 1984. Testing containment of conjunctive queries under functional and inclusion dependencies. J. Comput. Syst. Sci. 28, 1, 167--189.Google ScholarCross Ref
- Stanislav Kikot, Roman Kontchakov, and Michael Zakharyaschev. 2012a. Conjunctive query answering with OWL 2 QL. In Proceedings of the 13th International Conference on Principles of Knowledge Representation and Reasoning.Google Scholar
- Stanislav Kikot, Roman Kontchakov, Vladimir V. Podolskii, and Michael Zakharyaschev. 2012b. Exponential lower bounds and separation for query rewriting. In Proceedings of the 39th International Colloquium on Automata, Languages and Programming. 263--274. Google ScholarDigital Library
- Melanie Konig, Michel LeClere, Marie-Laure Mugnier, and Michael Thomazo. 2012. A sound and complete backward chaining algorithm for existential rules. In Proceedings of the 6th International Conference on Web Reasoning and Rule Systems. 122--138. Google ScholarDigital Library
- Melanie Konig, Michel LeClere, Marie-Laure Mugnier, and Michael Thomazo. 2013. On the exploration of the query rewriting space with existential rules. In Proceedings of the 7th International Conference on Web Reasoning and Rule Systems. 123--137. Google ScholarDigital Library
- Markus Krotzsch and Sebastian Rudolph. 2011. Extending decidable existential rules by joining acyclicity and guardedness. In Proceedings of the 22nd International Joint Conference on Artificial Intelligence. 963--968. Google ScholarDigital Library
- David Maier, Alberto O. Mendelzon, and Yehoshua Sagiv. 1979. Testing implications of data dependencies. ACM Trans. Database Syst. 4, 4, 455--469. Google ScholarDigital Library
- Giorgio Orsi and Andreas Pieris. 2011. Optimizing query answering under ontological constraints. Proc. VLDB Endow. 4, 11, 1004--1015.Google Scholar
- Christos. H. Papadimitriou. 1994. Computational Complexity. Addison-Wesley.Google Scholar
- Hector Perez-Urbina, Boris Motik, and Ian Horrocks. 2010. Tractable query answering and rewriting under description logic constraints. J. Appl. Logic 8, 2, 186--209.Google ScholarCross Ref
- Antonella Poggi, Domenico Lembo, Diego Calvanese, Giuseppe De Giacomo, Maurizio Lenzerini, and Riccardo Rosati. 2008. Linking data to ontologies. J. Data Semant. 10, 133--173. Google ScholarCross Ref
- Mariano Rodriguez-Muro and Diego Calvanese. 2012. Quest, an OWL 2 QL reasoner for ontology-based data access. In Proceedings of the OWL: Experiences and Directions Workshop.Google Scholar
- Riccardo Rosati and Alessandro Almatelli. 2010. Improving query answering over dl-lite ontologies. In Proceedings of the 12th International Conference on Principles of Knowledge Representation and Reasoning.Google Scholar
- Sebastian Rudolph, Markus Krotzsch, and Pascal Hitzler. 2008. All elephants are bigger than all mice. In Proceedings of the 21st International Workshop on Description Logics.Google Scholar
- Balder Ten Cate and Phokion G. Kolaitis. 2009. Structural characterizations of schema-mapping languages. In Proceedings of the 12th International Conference on Database Theory. 63--72. Google ScholarDigital Library
- Michael Thomazo. 2013. Compact rewritings for existential rules. In Proceedings of the 23rd International Joint Conference on Artificial Intelligence. Google ScholarDigital Library
- Moshe Y. Vardi. 1995. On the complexity of bounded-variable queries. In Proceedings of the 14th ACM Symposium on Principles of Database Systems. 266--276. Google ScholarDigital Library
- Tassos Venetis, Giorgos Stoilos, and Giorgos Stamou. 2013. Query extensions and incremental query rewriting for OWL 2 QL ontologies. J. Data Semant. 3, 1, 1--23.Google ScholarCross Ref
Index Terms
- Query Rewriting and Optimization for Ontological Databases
Recommendations
Determinacy and query rewriting for conjunctive queries and views
Answering queries using views is the problem which examines how to derive the answers to a query when we only have the answers to a set of views. Constructing rewritings is a widely studied technique to derive those answers. In this paper we consider ...
Polynomial combined first-order rewritings for linear and guarded existential rules
AbstractWe consider the problem of ontological query answering, that is, the problem of answering a database query (typically a conjunctive query) in the presence of an ontology. This means that during the query answering process we also need ...
Ontological query answering under many-valued group preferences in Datalog+/–
AbstractThe Web has recently been changing more and more to what is called the Social Semantic Web. As a consequence, the ranking of search results no longer depends solely on the structure of the interconnections among Web pages. In this ...
Highlights- Top-k QA with quant. preferences in Datalog+/– for unions of CQs with safe negation.
Comments