Skip to main content
QUICK REVIEW

[Paper Review] Rewriting Ontological Queries into Small Nonrecursive Datalog Programs

Georg Gottlob, Thomas Schwentick|arXiv (Cornell University)|Jun 19, 2011
Logic, Reasoning, and KnowledgeComputer Science31 references77 citations
TL;DR

This paper presents a polynomial-time method to rewrite ontological queries expressed in DL-Lite or Linear Datalog ± into small, nonrecursive Datalog programs, avoiding exponential blowup in query size. The key contribution is proving that such rewritings exist and can be constructed efficiently when the underlying tuple-generating dependencies satisfy the Polynomial Witness Property.

ABSTRACT

We consider the setting of ontological database access, where an Abox is given in form of a relational database D and where a Boolean conjunctive query q has to be evaluated against D modulo a Tbox T formulated in DL-Lite or Linear Datalog+/-. It is well-known that (T,q) can be rewritten into an equivalent nonrecursive Datalog program P that can be directly evaluated over D. However, for Linear Datalog? or for DL-Lite versions that allow for role inclusion, the rewriting methods described so far result in a nonrecursive Datalog program P of size exponential in the joint size of T and q. This gives rise to the interesting question of whether such a rewriting necessarily needs to be of exponential size. In this paper we show that it is actually possible to translate (T,q) into a polynomially sized equivalent nonrecursive Datalog program P.

Motivation & Objective

  • Address the problem of exponential blowup in query rewriting for ontological databases, particularly when using DL-Lite or Linear Datalog ± with role inclusion.
  • Investigate whether query rewritings into nonrecursive Datalog can be kept polynomial in size, rather than exponential, as in prior methods.
  • Establish conditions under which such polynomial-size rewritings are possible, focusing on the structural properties of the dependencies.
  • Provide a theoretical foundation for efficient query evaluation using standard DBMS technology by compiling ontological queries into equivalent nonrecursive Datalog programs.

Proposed method

  • Leverage the chase procedure to simulate the logical consequences of tuple-generating dependencies (tgds) over a database.
  • Introduce the Polynomial Witness Property (PWP) as a sufficient condition for ensuring that query entailment can be witnessed in a polynomial number of chase steps.
  • Construct a nonrecursive Datalog program by encoding chase derivations up to the polynomial bound guaranteed by PWP.
  • Use a goal predicate to represent the query result, ensuring that the Datalog program derives the goal if and only if the original query is entailed.
  • Control the arity of the Datalog predicates using a linear order or logarithmic encoding when no global order is available.
  • Apply the method to specific classes of tgds, including linear tgds, sticky tgds, and sticky-join tgds, by proving they satisfy the PWP.

Experimental results

Research questions

  • RQ1Can ontological queries in DL-Lite or Linear Datalog ± be rewritten into nonrecursive Datalog programs of polynomial size?
  • RQ2Is there a structural property of tuple-generating dependencies that guarantees polynomial-size rewritings?
  • RQ3Can the chase procedure be used to construct such rewritings efficiently, without exponential blowup?
  • RQ4Do formalisms like sticky tgds and sticky-join tgds, which allow role inclusion, admit polynomial-size nonrecursive Datalog rewritings?
  • RQ5What is the minimal arity required for the resulting Datalog program, and how does it depend on the input schema and query?

Key findings

  • For any class of tgds satisfying the Polynomial Witness Property (PWP), every Boolean conjunctive query can be rewritten into a nonrecursive Datalog program of size polynomial in the joint size of the query and the T-box.
  • The arity of the resulting Datalog program is at most max(a+1, 3), where a is the maximum predicate arity in the schema, assuming a global linear order is available.
  • In the absence of a global order, the arity is bounded by O(max(a+1, 3) · log m), where m is the joint size of the query and T-box.
  • The method applies to several important formalisms, including linear tgds, DL-Lite variants with role inclusion, and sticky tgds, all of which satisfy the PWP.
  • The construction runs in polynomial time, enabling efficient preprocessing for query evaluation over standard DBMSs via SQL translation.
  • The results extend prior work by avoiding exponential blowup in query size, even in the presence of role inclusion axioms, which were previously known to cause exponential growth in rewriting size.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.