6,588 research outputs found
Query Evaluation in Deductive Databases
It is desirable to answer queries posed to deductive databases by computing fixpoints because such computations are directly amenable to set-oriented fact processing. However, the classical fixpoint procedures based on bottom-up processing — the naive and semi-naive methods — are rather primitive and often inefficient. In this article, we rely on bottom-up meta-interpretation for formalizing a new fixpoint procedure that performs a different kind of reasoning: We specify a top-down query answering method, which we call the Backward Fixpoint Procedure. Then, we reconsider query evaluation methods for recursive databases. First, we show that the methods based on rewriting on the one hand, and the methods based on resolution on the other hand, implement the Backward Fixpoint Procedure. Second, we interpret the rewritings of the Alexander and Magic Set methods as specializations of the Backward Fixpoint Procedure. Finally, we argue that such a rewriting is also needed in a database context for implementing efficiently the resolution-based methods. Thus, the methods based on rewriting and the methods based on resolution implement the same top-down evaluation of the original database rules by means of auxiliary rules processed bottom-up
Provenance Circuits for Trees and Treelike Instances (Extended Version)
Query evaluation in monadic second-order logic (MSO) is tractable on trees
and treelike instances, even though it is hard for arbitrary instances. This
tractability result has been extended to several tasks related to query
evaluation, such as counting query results [3] or performing query evaluation
on probabilistic trees [10]. These are two examples of the more general problem
of computing augmented query output, that is referred to as provenance. This
article presents a provenance framework for trees and treelike instances, by
describing a linear-time construction of a circuit provenance representation
for MSO queries. We show how this provenance can be connected to the usual
definitions of semiring provenance on relational instances [20], even though we
compute it in an unusual way, using tree automata; we do so via intrinsic
definitions of provenance for general semirings, independent of the operational
details of query evaluation. We show applications of this provenance to capture
existing counting and probabilistic results on trees and treelike instances,
and give novel consequences for probability evaluation.Comment: 48 pages. Presented at ICALP'1
Nesting Depth of Operators in Graph Database Queries: Expressiveness Vs. Evaluation Complexity
Designing query languages for graph structured data is an active field of
research, where expressiveness and efficient algorithms for query evaluation
are conflicting goals. To better handle dynamically changing data, recent work
has been done on designing query languages that can compare values stored in
the graph database, without hard coding the values in the query. The main idea
is to allow variables in the query and bind the variables to values when
evaluating the query. For query languages that bind variables only once, query
evaluation is usually NP-complete. There are query languages that allow binding
inside the scope of Kleene star operators, which can themselves be in the scope
of bindings and so on. Uncontrolled nesting of binding and iteration within one
another results in query evaluation being PSPACE-complete.
We define a way to syntactically control the nesting depth of iterated
bindings, and study how this affects expressiveness and efficiency of query
evaluation. The result is an infinite, syntactically defined hierarchy of
expressions. We prove that the corresponding language hierarchy is strict.
Given an expression in the hierarchy, we prove that it is undecidable to check
if there is a language equivalent expression at lower levels. We prove that
evaluating a query based on an expression at level i can be done in
in the polynomial time hierarchy. Satisfiability of quantified Boolean formulas
can be reduced to query evaluation; we study the relationship between
alternations in Boolean quantifiers and the depth of nesting of iterated
bindings.Comment: Improvements from ICALP 2016 review comment
Model Counting of Query Expressions: Limitations of Propositional Methods
Query evaluation in tuple-independent probabilistic databases is the problem
of computing the probability of an answer to a query given independent
probabilities of the individual tuples in a database instance. There are two
main approaches to this problem: (1) in `grounded inference' one first obtains
the lineage for the query and database instance as a Boolean formula, then
performs weighted model counting on the lineage (i.e., computes the probability
of the lineage given probabilities of its independent Boolean variables); (2)
in methods known as `lifted inference' or `extensional query evaluation', one
exploits the high-level structure of the query as a first-order formula.
Although it is widely believed that lifted inference is strictly more powerful
than grounded inference on the lineage alone, no formal separation has
previously been shown for query evaluation. In this paper we show such a formal
separation for the first time.
We exhibit a class of queries for which model counting can be done in
polynomial time using extensional query evaluation, whereas the algorithms used
in state-of-the-art exact model counters on their lineages provably require
exponential time. Our lower bounds on the running times of these exact model
counters follow from new exponential size lower bounds on the kinds of d-DNNF
representations of the lineages that these model counters (either explicitly or
implicitly) produce. Though some of these queries have been studied before, no
non-trivial lower bounds on the sizes of these representations for these
queries were previously known.Comment: To appear in International Conference on Database Theory (ICDT) 201
First-Order Query Evaluation with Cardinality Conditions
We study an extension of first-order logic that allows to express cardinality
conditions in a similar way as SQL's COUNT operator. The corresponding logic
FOC(P) was introduced by Kuske and Schweikardt (LICS'17), who showed that query
evaluation for this logic is fixed-parameter tractable on classes of structures
(or databases) of bounded degree. In the present paper, we first show that the
fixed-parameter tractability of FOC(P) cannot even be generalised to very
simple classes of structures of unbounded degree such as unranked trees or
strings with a linear order relation.
Then we identify a fragment FOC1(P) of FOC(P) which is still sufficiently
strong to express standard applications of SQL's COUNT operator. Our main
result shows that query evaluation for FOC1(P) is fixed-parameter tractable
with almost linear running time on nowhere dense classes of structures. As a
corollary, we also obtain a fixed-parameter tractable algorithm for counting
the number of tuples satisfying a query over nowhere dense classes of
structures
- …