Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
129 tokens/sec
GPT-4o
28 tokens/sec
Gemini 2.5 Pro Pro
42 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Query Rewriting and Optimization for Ontological Databases (1405.2848v1)

Published 12 May 2014 in cs.DB

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 which 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 paper, 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 which 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 so to produce possibly small and cost-effective UCQ rewritings for an input query.

Citations (99)

Summary

  • The paper introduces the XRewrite algorithm that reformulates conjunctive queries with TGDs into equivalent SQL queries.
  • It outlines query elimination and parallel rewriting techniques to reduce processing complexity and enhance scalability.
  • Empirical evaluations show improved performance over existing systems, advancing efficient ontological query answering.

An Analysis of Query Rewriting and Optimization for Ontological Databases

The paper "Query Rewriting and Optimization for Ontological Databases" by G. Gottlob et al. explores two critical processes in the domain of ontology-based data access: query rewriting and query optimization. The research context is ontological database systems, defined by a combination of an extensional database and an ontology capable of deriving additional knowledge through logical assertions.

Ontological query answering extends traditional database query answering by evaluating queries against the combined dataset and ontological constraints. This paradigm necessitates efficient methods for reformulating ontological queries into equivalent queries that RDBMSs can directly execute.

Query Rewriting

At its core, the paper proposes a novel algorithm, XRewrite\mathsf{XRewrite}, aimed at transforming conjunctive queries (CQs) within the presence of ontological constraints expressed as TGDs (tuple-generating dependencies). The challenge lies in maintaining soundness and completeness while ensuring practical feasibility. The algorithm systematically rewrites queries using TGDs as backward-chaining rules, avoiding the direct materialization of potentially infinite ontology-driven facts.

The paper focuses on linear and sticky TGDs, key syntactic classes within TGDs known to guarantee first-order rewritability, a property allowing CQs to be reformulated into Union of Conjunctive Queries (UCQs) that SQL can express. The proposed backward-chaining approach hinges on iterative rewriting steps and an auxiliary factorization step to handle shared variables, ensuring the generation of all necessary queries for completeness.

Query Optimization

The research also introduces query optimization through query elimination, leveraging the linear structure of some TGDs to identify and remove redundant query parts. This optimization reduces the complexity of query processing by minimizing the number of atoms and joins, underscoring the relation between ontology rules and query components.

Parallel Rewriting

Further scalability is achieved by parallelizing the rewriting process, encapsulated in the XRewriteParallel\mathsf{XRewriteParallel} algorithm. This technique decomposes a given query into independent subqueries, enabling concurrent processing and subsequent merging. The practical impact of this parallel approach is demonstrated through substantial reductions in rewriting time for decomposable queries.

Evaluation and Implications

The paper presents extensive benchmarks, revealing the balance between correctness and performance. The tests demonstrate the algorithm’s efficiency compared to existing systems like Alaska, particularly highlighting the benefits of query elimination and parallel rewriting.

From a theoretical standpoint, the work underscores the potential of semantically rich database systems in handling more expressive data models while integrating traditional SQL-based query processing. The proposed methods carve a path toward databases natively supporting ontological reasoning, heralding advancements in semantic web technologies, data integration, and knowledge graph management.

In conclusion, this paper offers significant contributions to ontological query processing, advancing both theoretical understanding and practical capabilities. Future research could aim at extending these techniques to more complex ontological constraints and further integrating them into commercial database systems. The pursuit of reducing computational overhead while preserving expressive power remains an ongoing quest, with this paper serving as a foundational stone.