Skip to main content

Guarded Ontology-Mediated Queries

  • Chapter
  • First Online:
Hajnal Andréka and István Németi on Unity of Science

Part of the book series: Outstanding Contributions to Logic ((OCTR,volume 19))

Abstract

We concentrate on ontology-mediated queries (OMQs) expressed using guarded Datalog\(^\exists \) and conjunctive queries. Guarded Datalog\(^\exists \) is a rule-based knowledge representation formalism inspired by the guarded fragment of first-order logic, while conjunctive queries represent a prominent database query language that lies at the core of relational calculus (i.e., first-order queries). For such guarded OMQs we discuss three main algorithmic tasks: query evaluation, query containment, and first-order rewritability. The first one is the task of computing the answer to an OMQ over an input database. The second one is the task of checking whether the answer to an OMQ is contained in the answer of some other OMQ on every input database. The third one asks whether an OMQ can be equivalently rewritten as a first-order query. For query evaluation, we explain how classical results on the satisfiability problem for the guarded fragment of first-order logic can be applied. For query containment, we discuss how tree automata techniques can be used. Finally, for first-order rewritability, we explain how techniques based on a more sophisticated automata model, known as cost automata, can be exploited.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    For technical clarity, we assume that CQs do not mention constants from \(\mathbf {C}\). However, all the results that we discuss can be extended to CQs with constants.

  2. 2.

    For brevity, in the rest of the chapter we adopt the acronym TGD instead of the term Datalog\(^\exists \).

  3. 3.

    Here, we see models as sets of atoms, i.e., as instances.

  4. 4.

    Recall that \(\mathsf {F}\) denotes the class of full TGDs, i.e., TGDs without existentially quantified variables.

  5. 5.

    This result from [11] initially relied on an unpublished result. Such a result has been now published in [21].

References

  1. Ajtai, M., & Gurevich, Y. (1994). Datalog vs. first-order logic. Journal of Computer and System Sciences, 49(3), 562–588.

    Article  Google Scholar 

  2. Andréka, H., Németi, I., & van Benthem, J. (1998). Modal languages and bounded fragments of predicate logic. Journal of Philosophical Logic, 27(3), 217–274.

    Article  Google Scholar 

  3. Arenas, M., Hull, R., Martens, W., Milo, T., & Schwentick, T. (2016). Foundations of data management (Dagstuhl perspectives workshop 16151). Dagstuhl Reports, 6(4), 39–56.

    Google Scholar 

  4. Baget, J.-F., Leclère, M., Mugnier, M.-L., & Salvat, E. (2011). On rules with existential variables: Walking the decidability line. Artificial Intelligence, 175(9–10), 1620–1654.

    Article  Google Scholar 

  5. Bárány, V., Gottlob, G., & Otto, M. (2014). Querying the guarded fragment. Logical Methods in Computer Science, 10(2)

    Google Scholar 

  6. Bárány, V., ten Cate, B., & Segoufin, L. (2015). Guarded negation. Journal of ACM, 62(3), 22:1–22:26.

    Google Scholar 

  7. Barceló, P., Berger, G., Lutz, C., & Pieris, A. (2018). First-order rewritability of frontier-guarded ontology-mediated queries. In IJCAI (pp. 1707–1713).

    Google Scholar 

  8. Barceló, P., Berger, G., & Pieris, A. (2018). Containment for rule-based ontology-mediated queries. In PODS (pp. 267–279).

    Google Scholar 

  9. Beeri, C., & Vardi, M. Y. (1981). The implication problem for data dependencies. In ICALP (pp. 73–85).

    Google Scholar 

  10. Benedikt, M., Bourhis, P., & Vanden Boom, M. (2016). A step up in expressiveness of decidable fixpoint logics. In LICS (pp. 817–826).

    Google Scholar 

  11. Benedikt, M., ten Cate, B., Colcombet, T., & Vanden Boom, M. (2015). The complexity of boundedness for guarded logics. In LICS (pp. 293–304).

    Google Scholar 

  12. Bienvenu, M., Hansen, P., Lutz, C., & Wolter, F. (2016). First order-rewritability and containment of conjunctive queries in horn description logics. In IJCAI (pp. 965–971).

    Google Scholar 

  13. Bienvenu, M., Lutz, C., & Wolter, F. (2013). First-order rewritability of atomic queries in horn description logics. In IJCAI (pp. 754–760).

    Google Scholar 

  14. Bienvenu, M., ten Cate, B., Lutz, C., & Wolter, F. (2014). Ontology-based data access: A study through disjunctive Datalog, CSP, and MMSNP. ACM Transactions on Database Systems, 39(4), 33:1–33:44.

    Google Scholar 

  15. Bourhis, P., Manna, M., Morak, M., & Pieris, A. (2016). Guarded-based disjunctive tuple-generating dependencies. ACM Transactions on Database Systems, 41(4), 27:1–27:45.

    Google Scholar 

  16. Calì, A., Gottlob, G., & Kifer, M. (2013). Taming the infinite chase: Query answering under expressive relational constraints. Journal of Artificial Intelligence Research, 48, 115–174.

    Article  Google Scholar 

  17. Calì, A., Gottlob, G., & Lukasiewicz, T. (2009). A general datalog-based framework for tractable query answering over ontologies. In PODS (pp. 77–86).

    Google Scholar 

  18. Calì, A., Gottlob, G., Lukasiewicz, T., Marnette, B., & Pieris, A. (2010). Datalog+/-: A family of logical knowledge representation and query languages for new applications. In LICS (pp. 228–242).

    Google Scholar 

  19. Calì, A., Gottlob, G., & Pieris, A. (2012). Towards more expressive ontology languages: The query answering problem. Journal of Artificial Intelligence, 193, 87–128.

    Article  Google Scholar 

  20. Colcombet, T. (2009). The theory of stabilisation monoids and regular cost functions. In ICALP (pp. 139–150).

    Google Scholar 

  21. Colcombet, T., & Fijalkow, N. (2016). The bridge between regular cost functions and omega-regular languages. In ICALP (pp. 126:1–126:13).

    Google Scholar 

  22. Colcombet, T., & Löding, C. (2010). Regular cost functions over finite trees. In LICS (pp. 70–79).

    Google Scholar 

  23. Cosmadakis, S. S., Gaifman, H., Kanellakis, P. C., & Vardi, M. Y. (1988). Decidable optimization problems for database logic programs (preliminary report). In STOC (pp. 477–490).

    Google Scholar 

  24. Gaifman, H., Mairson, H. G., Sagiv, Y., & Vardi, M. Y. (1993). Undecidable optimization problems for database logic programs. Journal of ACM, 40(3), 683–713.

    Article  Google Scholar 

  25. Gottlob, G., Hernich, A., Kupke, C., & Lukasiewicz, T. (2014). Stable model semantics for guarded existential rules and description logics. In KR.

    Google Scholar 

  26. Gottlob, G., Leone, N., & Scarcello, F. (2003). Robbers, marshals, and guards: Game theoretic and logical characterizations of hypertree width. Journal of Computer and System Sciences, 66(4), 775–808.

    Article  Google Scholar 

  27. Grädel, E. (1999). On the restraining power of guards. Journal of Symbolic Logic, 64(4), 1719–1742.

    Article  Google Scholar 

  28. Hernich, A., Kupke, C., Lukasiewicz, T., & Gottlob, G. (2013). Well-founded semantics for extended datalog and ontological reasoning. In PODS (pp. 225–236).

    Google Scholar 

  29. Hernich, A., Lutz, C., Papacchini, F., & Wolter, F. (2017). Dichotomies in ontology-mediated querying with the guarded fragment. In PODS (pp. 185–199).

    Google Scholar 

  30. Leone, N., Manna, M., Terracina, G., & Veltri, P. (2012). Efficiently computable Datalog\(\exists \) programs. In KR.

    Google Scholar 

  31. Poggi, A., Lembo, D., Calvanese, D., De Giuseppe, G., Lenzerini, M., & Rosati, R. (2008). Linking data to ontologies. Journal of Data Semantics, 10, 133–173.

    Google Scholar 

  32. Rosati, R. (2007). The limits of querying ontologies. In ICDT (pp. 164–178).

    Google Scholar 

  33. Rosati, R. (2011). On the finite controllability of conjunctive query answering in databases under open-world assumption. Journal of Computer and System, 77(3), 572–594.

    Article  Google Scholar 

  34. Rossman, B. (2008). Homomorphism preservation theorems. Journal of ACM, 55(3), 15:1–15:53.

    Google Scholar 

  35. Shmueli, O. (1993). Equivalence of DATALOG queries is undecidable. Journal of Logic Programming, 15(3), 231–241.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Andreas Pieris .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Barceló, P., Berger, G., Gottlob, G., Pieris, A. (2021). Guarded Ontology-Mediated Queries. In: Madarász, J., Székely, G. (eds) Hajnal Andréka and István Németi on Unity of Science. Outstanding Contributions to Logic, vol 19. Springer, Cham. https://doi.org/10.1007/978-3-030-64187-0_2

Download citation

Publish with us

Policies and ethics