Query Rewriting Beyond DL-Lite

Carsten LutzDescription Logics 2015

Introduction

Ontology-Mediated Querying (OMQ) serves as a cornerstone for Ontology-Based Data Access (OBDA), allowing users to query heterogeneous data sources through a conceptual lens provided by an ontology. A primary goal in this field is First-Order (FO) rewritability: the ability to transform a query posed over an ontology into a standard SQL query that can be executed efficiently by traditional relational database management systems.

While FO-rewritability is a guaranteed feature of the DL-Lite family of Description Logics (DLs), many real-world applications require more expressive logics, such as $ALC$ or $ALCI$, which support disjunctions and more complex existential restrictions. In these expressive frameworks, rewritability is no longer guaranteed. In "Query Rewriting Beyond DL-Lite," Carsten Lutz provides a theoretical breakthrough by characterizing exactly when queries in these complex logics can be translated into FO logic, effectively bridging the gap between simple and expressive logic frameworks.

The Challenge of Expressivity

In the context of OBDA, the ontology (TBox) provides the rules and logic that help the database understand relationships between data points (ABox). In simpler "Horn" logics like DL-Lite, the interaction between the query and the ontology is predictable, making SQL translation straightforward. However, researchers and engineers often require "Non-Horn" logics to handle disjunctions (OR statements) and inverse roles.

In these expressive logics, a query might not be FO-rewritable because the logic can express recursive or non-local dependencies that SQL cannot handle. The fundamental challenge addressed by Lutz is identifying a decidable condition that determines whether a specific query in a complex logic like $ALCI$ can be simplified into an FO-rewriting.

Theoretical Framework: Unraveling Tolerance

The paper introduces unraveling tolerance as the "secret sauce" for understanding rewritability. Unraveling is a mathematical process that transforms a general dataset (an ABox) into a "tree-like" version of itself. A query is considered unraveling tolerant if its truth on a general dataset implies its truth on the unraveled, tree-shaped version.

Lutz leverages several sophisticated tools to analyze this property:

  • Constraint Satisfaction Problems (CSPs): The paper maps the problem of query rewriting to CSPs, allowing the author to use established mathematical results regarding tree duality and finite duality.
  • Tree-Shaped ABoxes: By focusing on how queries behave on datasets without cycles, the author proves that a query's behavior on simple trees can predict its rewritability on any arbitrary dataset structure.

Key Insights and The Grand Unified Theory

Historically, Horn and Non-Horn logics were treated as distinct entities with different rules for rewritability. This paper demonstrates that unraveling tolerance—a property naturally enjoyed by Horn logics—is actually the defining requirement for rewritability in Non-Horn logics as well.

Theorem 4: The Main Result

The paper establishes that a query in the expressive logic $(ALCI, BAQ)$ is FO-rewritable if and only if:

  1. It is FO-rewritable specifically when restricted to tree-shaped datasets.
  2. It is unraveling tolerant.

This characterization provides a clear path for determining the limits of SQL-based querying in complex systems. Furthermore, the paper proves a Structural Corollary: if a complex query is indeed rewritable, the resulting SQL-like query will always take the form of a Union of Conjunctive Queries (UCQ) consisting of tree-shaped components. This significantly simplifies the search for practical rewritings.

Results and Complexity

Lutz establishes that deciding whether a query in $(ALCI, BAQ)$ is FO-rewritable is NExpTime-complete. While this represents a high computational complexity, the fact that the problem is decidable at all is a major theoretical milestone.

Additionally, the research provides a characterization of monadic Datalog. The author shows that unraveling tolerance is exactly equivalent to the ability to rewrite a query into monadic Datalog—a language more powerful than SQL (FO) but less powerful than full recursion. This places FO-rewritability within a broader hierarchy of query languages.

Limitations and Future Directions

Despite the theoretical success, several hurdles remain for practical implementation:

  • Boolean vs. Non-Boolean Queries: The current results focus primarily on Boolean queries (Yes/No answers). Extending this to "Atomic Queries" (which return specific data points) is more complex because the standard definition of unraveling tolerance does not apply directly.
  • Algorithm Engineering: The NExpTime-complete complexity suggests that current decision procedures are "best-case exponential." Practical software will require significant algorithm engineering to handle real-world ontologies.
  • Nominals: The current framework does not yet account for "nominals" (logic referring to specific individuals, such as "The President"). Future work aims to adapt these results to even more expressive logics that include these specific references.

By providing a "Grand Unified Theory" for FO-rewritability, Lutz has laid the groundwork for more powerful and flexible Ontology-Based Data Access systems that can move beyond the constraints of DL-Lite.

Summary updated

BibTeX
@inproceedings{lutz2015query,
  author = {Carsten Lutz},
  title = {{Query Rewriting Beyond DL-Lite}},
  booktitle = {Description Logics},
  year = {2015},
}
Figure