Abstract

The number of variables used by a first-order query is a fundamental measure which has been studied in numerous contexts, and which is known to be highly relevant to the task of query evaluation. In this article, we study this measure in the context of existential positive queries. Building on previous work, we present a combinatorial quantity defined on existential positive queries; we show that this quantity not only characterizes the minimum number of variables needed to express a given existential positive query by another existential positive query, but also that it characterizes the minimum number of variables needed to express a given existential positive query, over all first-order queries. Put differently and loosely, we show that for any existential positive query, no variables can ever be saved by moving out of existential positive logic to first-order logic. One component of this theorem's proof is the construction of a winning strategy for a certain Ehrenfeucht-Fra\{i}ss\'{e} type game.

Highlights

  • The number of variables used by a first-order query is recognized as a highly useful and fundamental measure, and has been studied in numerous settings, including descriptive complexity, finite model theory, and query evaluation

  • A first reason for this is that the natural bottom-up algorithm for evaluating a first-order query on a finite structure exhibits, in general, an exponential dependence on the number of variables; it runs in polynomial-time when a constant bound is placed on the number of variables [21]

  • Given the computational relevance of the number of variables as a query measure, it is natural to inquire, given a query, to what extent the number of variables can be minimized; it is a natural desire to attempt to rewrite/optimize a given query as one that uses the fewest number of variables. We study this question on existential positive queries

Read more

Summary

Introduction

To establish the inexpressibility portion of our primary theorem, for each Boolean existential positive query φ, we show how to construct two finite structures B, B on which the query differs, but which are not distinguishable from each other by any first-order query using a number of variables strictly less than the combinatorial width of φ. To show this non-distinguishability, we make use of a known Ehrenfeucht-Fraïssé type game [5, 19] designed for showing non-FOm-expressibility. We mention the work of Dalmau et al on conjunctive queries and the existential pebble game [15]; the works of Chen and Dalmau on quantified conjunctive queries [13, 8]; the work of Chen and Dalmau on conjunctive queries and generalized hypertree width [12]; and, the work of Barceló et al [4] on semantically acyclic query evaluation under database constraints

Preliminaries
Construction of Structures
Construction of B and B
A Treats B and B Differently
B and B are FOk-Indistinguishable
Existential Positive Logic
Main Theorems and Consequences
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call