Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Query Rewriting and Optimization for Ontological Databases

Published: 07 October 2014 Publication History

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.

Supplementary Material

a25-gottlob-apndx.pdf (gottlob.zip)
Supplemental movie, appendix, image and software files for, Query Rewriting and Optimization for Ontological Databases

References

[1]
Serge Abiteboul, Richard Hull, and Victor Vianu. 1995. Foundations of Databases. Addison-Wesley.
[2]
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.
[3]
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.
[4]
Hajnal Andreka, Johan van Benthem, and Istvan Nemeti. 1998. Modal languages and bounded fragments of predicate logic. J. Philos. Logic 27, 217--274.
[5]
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.
[6]
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.
[7]
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.
[8]
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.
[9]
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.
[10]
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.
[11]
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.
[12]
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.
[13]
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.
[14]
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.
[15]
Andrea Cali, Georg Gottlob, Thomas Lukasiewicz, and Andreas Pieris. 2011. A logical toolbox for ontological reasoning. SIGMOD Rec. 40, 3, 5--14.
[16]
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.
[17]
Andrea Cali, Georg Gottlob, and Andreas Pieris. 2012b. Towards more expressive ontology languages: The query answering problem. Artif. Intell. 193, 87--128.
[18]
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.
[19]
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.
[20]
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.
[21]
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.
[22]
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.
[23]
Ashok K. Chandra and Moshe Y. Vardi. 1985. The implication problem for functional and inclusion dependencies. SIAM J. Comput. 14, 671--677.
[24]
Chandra Chekuri and Anand Rajaraman. 2000. Conjunctive query containment revisited. Theor. Comput. Sci. 239, 2, 211--229.
[25]
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.
[26]
Carlo Curino, Hyun Jin Moon, Alin Deutsch, and Carlo Zaniolo. 2013. Automating the database schema evolution process. VLDB J. 22, 1, 73--98.
[27]
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.
[28]
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.
[29]
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.
[30]
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.
[31]
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.
[32]
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.
[33]
Georg Gottlob, Nicola Leone, and Francesco Scarcello. 2002. Hypertree decompositions and tractable queries. J. Comput. Syst. Sci. 64, 3, 579--627.
[34]
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.
[35]
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.
[36]
Alon Y. Halevy. 2001. Answering queries using views: A survey. VLDB J. 10, 4, 270--294.
[37]
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.
[38]
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.
[39]
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.
[40]
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.
[41]
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.
[42]
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.
[43]
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.
[44]
David Maier, Alberto O. Mendelzon, and Yehoshua Sagiv. 1979. Testing implications of data dependencies. ACM Trans. Database Syst. 4, 4, 455--469.
[45]
Giorgio Orsi and Andreas Pieris. 2011. Optimizing query answering under ontological constraints. Proc. VLDB Endow. 4, 11, 1004--1015.
[46]
Christos. H. Papadimitriou. 1994. Computational Complexity. Addison-Wesley.
[47]
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.
[48]
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.
[49]
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.
[50]
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.
[51]
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.
[52]
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.
[53]
Michael Thomazo. 2013. Compact rewritings for existential rules. In Proceedings of the 23rd International Joint Conference on Artificial Intelligence.
[54]
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.
[55]
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.

Cited By

View all
  • (2024)Query Optimization for Ontology-Mediated Query AnsweringProceedings of the ACM Web Conference 202410.1145/3589334.3645567(2138-2148)Online publication date: 13-May-2024
  • (2024)Multimodal Query Suggestion with Multi-Agent Reinforcement Learning from Human FeedbackProceedings of the ACM Web Conference 202410.1145/3589334.3645365(1374-1385)Online publication date: 13-May-2024
  • (2023)Extending sticky-Datalog± via finite-position selection functionsInformation Systems10.1016/j.is.2022.102156114:COnline publication date: 1-Mar-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Database Systems
ACM Transactions on Database Systems  Volume 39, Issue 3
September 2014
264 pages
ISSN:0362-5915
EISSN:1557-4644
DOI:10.1145/2676651
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 07 October 2014
Accepted: 01 June 2014
Revised: 01 April 2014
Received: 01 October 2013
Published in TODS Volume 39, Issue 3

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Ontological query answering
  2. query optimization
  3. query rewriting
  4. tuple-generating dependencies

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)65
  • Downloads (Last 6 weeks)4
Reflects downloads up to 11 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Query Optimization for Ontology-Mediated Query AnsweringProceedings of the ACM Web Conference 202410.1145/3589334.3645567(2138-2148)Online publication date: 13-May-2024
  • (2024)Multimodal Query Suggestion with Multi-Agent Reinforcement Learning from Human FeedbackProceedings of the ACM Web Conference 202410.1145/3589334.3645365(1374-1385)Online publication date: 13-May-2024
  • (2023)Extending sticky-Datalog± via finite-position selection functionsInformation Systems10.1016/j.is.2022.102156114:COnline publication date: 1-Mar-2023
  • (2023)Polynomial combined first-order rewritings for linear and guarded existential rulesArtificial Intelligence10.1016/j.artint.2023.103936321(103936)Online publication date: Aug-2023
  • (2023)Saturation-Based Boolean Conjunctive Query Answering and Rewriting for the Guarded Quantification FragmentsJournal of Automated Reasoning10.1007/s10817-023-09687-x67:4Online publication date: 23-Nov-2023
  • (2022)Ontology-based Data FederationProceedings of the 11th International Joint Conference on Knowledge Graphs10.1145/3579051.3579070(10-19)Online publication date: 27-Oct-2022
  • (2022)A Journey to the Frontiers of Query RewritabilityProceedings of the 41st ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems10.1145/3517804.3524163(359-367)Online publication date: 12-Jun-2022
  • (2022)The Space-Efficient Core of VadalogACM Transactions on Database Systems10.1145/348872047:1(1-46)Online publication date: 6-Apr-2022
  • (2022)Query answering over inconsistent knowledge bases: A probabilistic approachTheoretical Computer Science10.1016/j.tcs.2022.09.005935(144-173)Online publication date: Oct-2022
  • (2022)A tetrachotomy of ontology-mediated queries with a covering axiomArtificial Intelligence10.1016/j.artint.2022.103738309(103738)Online publication date: Aug-2022
  • Show More Cited By

View Options

Get Access

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media