Nonrecursive incremental evaluation of Datalog queries (original) (raw)

First-Order Incremental Evaluation of Datalog Queries

Workshops in Computing, 1994

We consider the problem of repeatedly evaluating the same (computationally expensive) query to a database that is being updated between successive query requests. In this situation, it should be possible to use the di erence between successive database states and the answer to the query in one state to reduce the cost of evaluating the query in the next state. We use rst-order queries to compute the di erences, and call this process \ rst-order incremental query evaluation."

Increment boundedness and nonrecursive incremental evaluation of datalog queries

Lecture Notes in Computer Science, 1995

Given a recursive (datalog) query, the nonrecursive incremental evaluation approach uses nonrecursive (datalog) programs to compute the difference of the answers to the query against successive databases between updates. The mechanism used in this approach is called a "First-Order Incremental Evaluation System" (FOIES). We show that for two large classes of datalog queries, called "generalized (weakly) regular queries", FOIES always exist. We also define "increment boundedness" and its variations, which generalize boundedness. Increment bounded queries are shown to have FOIES of certain forms. We also relate increment boundedness to structural recursion, which was proposed for bulk data types. We characterize increment boundednessusing the "insertion idempotency", "insertion commutativity", and "determinism" properties of structural recursion. Finally, we show that the increment boundedness notions are undecidable and a decidable sufficient condition is given.

On the Power of Incremental Evaluation in SQL-Like Languages

1999

We consider IES(SQL), the incremental evaluation system over an SQL-like language with grouping, arithmetics, and aggregation. We show that every second order query is in IES(SQL) and that there are PSPACE-complete queries in IES(SQL). We further show that every PSPACE query is in IES(SQL) augmented with a deterministic transitive closure operator. Lastly, we consider ordered databases and provide a complete analysis of a hierarchy on IES(SQL) defined with respect to arity-bounded auxiliary relations.

Monadic Datalog and Regular Tree Pattern Queries

Lecture Notes in Computer Science, 2014

Containment of monadic datalog programs over trees is decidable. The situation is more complex when tree nodes carry labels from an infinite alphabet that can be tested for equality. Then, it matters whether descendant relation is allowed or not: descendant relation can be eliminated easily from monadic programs only when label equalities are not used. With descendant, even containment of linear monadic programs in unions of conjunctive queries is undecidable and positive results are known only for bounded-depth trees. We show that without descendant containment of connected monadic programs is decidable over ranked trees, but over unranked trees it is decidable only for linear programs. With descendant it becomes decidable over unranked trees under restriction to downward programs: in each rule we only go down from the node in the head. This restriction is motivated by the formalism of regular tree pattern queries, recently proposed in the area of ActiveXML, which we show to be equivalent to linear downward programs.

Datalog and Recursive Query Processing

Foundations and Trends® in Databases, 2012

In recent years, we have witnessed a revival of the use of recursive queries in a variety of emerging application domains such as data integration and exchange, information extraction, networking, and program analysis. A popular language used for expressing these queries is Datalog. This paper surveys for a general audience the Datalog language, recursive query processing, and optimization techniques. This survey differs from prior surveys written in the eighties and nineties in its comprehensiveness of topics, its coverage of recent developments and applications, and its emphasis on features and techniques beyond "classical" Datalog which are vital for practical applications. Specifically, the topics covered include the core Datalog language and various extensions, semantics, query optimizations, magic-sets optimizations, incremental view maintenance, aggregates, negation, and types. We conclude the paper with a survey of recent systems and applications that use Datalog and recursive queries.

Decidable containment of recursive queries

2002

One of the most important reasoning tasks on queries is checking containment, ie, verifying whether one query yields necessarily a subset of the result of another one. Query containment, is crucial in several contexts, such as query optimization, query reformulation, knowledge-base verification, information integration, integrity checking, and cooperative answering. Containment is undecidable in general for Datalog, the fundamental language for expressing recursive queries.

Rewriting Ontological Queries into Small Nonrecursive Datalog Programs

arXiv (Cornell University), 2011

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 T-box Σ formulated in DL-Lite or Linear Datalog ±. It is well-known that (Σ, 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 Σ 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 (Σ, q) into a polynomially sized equivalent nonrecursive Datalog program P .