776 research outputs found
Answering Conjunctive Queries with Inequalities
In this paper, we study the complexity of answering conjunctive queries (CQ)
with inequalities). In particular, we are interested in comparing the
complexity of the query with and without inequalities. The main contribution of
our work is a novel combinatorial technique that enables us to use any
Select-Project-Join query plan for a given CQ without inequalities in answering
the CQ with inequalities, with an additional factor in running time that only
depends on the query. The key idea is to define a new projection operator,
which keeps a small representation (independent of the size of the database) of
the set of input tuples that map to each tuple in the output of the projection;
this representation is used to evaluate all the inequalities in the query.
Second, we generalize a result by Papadimitriou-Yannakakis [17] and give an
alternative algorithm based on the color-coding technique [4] to evaluate a CQ
with inequalities by using an algorithm for the CQ without inequalities. Third,
we investigate the structure of the query graph, inequality graph, and the
augmented query graph with inequalities, and show that even if the query and
the inequality graphs have bounded treewidth, the augmented graph not only can
have an unbounded treewidth but can also be NP-hard to evaluate. Further, we
illustrate classes of queries and inequalities where the augmented graphs have
unbounded treewidth, but the CQ with inequalities can be evaluated in
poly-time. Finally, we give necessary properties and sufficient properties that
allow a class of CQs to have poly-time combined complexity with respect to any
inequality pattern. We also illustrate classes of queries where our
query-plan-based technique outperforms the alternative approaches discussed in
the paper
Queries with negation and inequalities over lightweight ontologies
While the problem of answering positive existential queries, in particular, conjunctive queries (CQs) and unions of CQs, over description logic ontologies has been studied extensively, there have been few attempts to analyse queries with negated atoms. Our aim is to sharpen the complexity landscape of the problem of answering CQs with negation and inequalities in lightweight description logics of the DL-Lite and EL families. We begin by considering queries with safe negation and show that there is a surprisingly significant increase in the complexity from AC0 to undecidability (even if the ontology and query are fixed and only the data is regarded as input). We also investigate the problem of answering queries with inequalities and show that answering a single CQ with one inequality over DL-Lite with role inclusions is undecidable. In the light of our undecidability results, we explore syntactic restrictions to attain efficient query answering with negated atoms. In particular, we identify a novel class of local CQs with inequalities, for which query answering over DL-Lite is decidable
Queries with Guarded Negation (full version)
A well-established and fundamental insight in database theory is that
negation (also known as complementation) tends to make queries difficult to
process and difficult to reason about. Many basic problems are decidable and
admit practical algorithms in the case of unions of conjunctive queries, but
become difficult or even undecidable when queries are allowed to contain
negation. Inspired by recent results in finite model theory, we consider a
restricted form of negation, guarded negation. We introduce a fragment of SQL,
called GN-SQL, as well as a fragment of Datalog with stratified negation,
called GN-Datalog, that allow only guarded negation, and we show that these
query languages are computationally well behaved, in terms of testing query
containment, query evaluation, open-world query answering, and boundedness.
GN-SQL and GN-Datalog subsume a number of well known query languages and
constraint languages, such as unions of conjunctive queries, monadic Datalog,
and frontier-guarded tgds. In addition, an analysis of standard benchmark
workloads shows that most usage of negation in SQL in practice is guarded
negation
Inconsistency-tolerant Query Answering in Ontology-based Data Access
Ontology-based data access (OBDA) is receiving great attention as a new paradigm for managing information systems through semantic technologies. According to this paradigm, a Description Logic ontology provides an abstract and formal representation of the domain of interest to the information system, and is used as a sophisticated schema for accessing the data and formulating queries over them. In this paper, we address the problem of dealing with inconsistencies in OBDA. Our general goal is both to study DL semantical frameworks that are inconsistency-tolerant, and to devise techniques for answering unions of conjunctive queries under such inconsistency-tolerant semantics. Our work is inspired by the approaches to consistent query answering in databases, which are based on the idea of living with inconsistencies in the database, but trying to obtain only consistent information during query answering, by relying on the notion of database repair. We first adapt the notion of database repair to our context, and show that, according to such a notion, inconsistency-tolerant query answering is intractable, even for very simple DLs. Therefore, we propose a different repair-based semantics, with the goal of reaching a good compromise between the expressive power of the semantics and the computational complexity of inconsistency-tolerant query answering. Indeed, we show that query answering under the new semantics is first-order rewritable in OBDA, even if the ontology is expressed in one of the most expressive members of the DL-Lite family
Conjunctive queries with negation over DL-Lite: a closer look
While conjunctive query (CQ) answering over DL-Lite has been studied extensively, there have been few attempts to analyse CQs with negated atoms. This paper deepens the study of the problem. Answering CQs with safe negation and CQs with a single inequality over DL-Lite with role inclusions is shown to be undecidable, even for a fixed TBox and query.Without role inclusions, answering CQs with one inequality is P-hard and with two inequalities CoNP-hard in data complexity
Querying Schemas With Access Restrictions
We study verification of systems whose transitions consist of accesses to a
Web-based data-source. An access is a lookup on a relation within a relational
database, fixing values for a set of positions in the relation. For example, a
transition can represent access to a Web form, where the user is restricted to
filling in values for a particular set of fields. We look at verifying
properties of a schema describing the possible accesses of such a system. We
present a language where one can describe the properties of an access path, and
also specify additional restrictions on accesses that are enforced by the
schema. Our main property language, AccLTL, is based on a first-order extension
of linear-time temporal logic, interpreting access paths as sequences of
relational structures. We also present a lower-level automaton model,
Aautomata, which AccLTL specifications can compile into. We show that AccLTL
and A-automata can express static analysis problems related to "querying with
limited access patterns" that have been studied in the database literature in
the past, such as whether an access is relevant to answering a query, and
whether two queries are equivalent in the accessible data they can return. We
prove decidability and complexity results for several restrictions and variants
of AccLTL, and explain which properties of paths can be expressed in each
restriction.Comment: VLDB201
- …