WorksComputer Science
Testability of Homomorphism Inadmissibility: Property Testing Meets Database Theory
Abstract
In this paper, we utilize the perspective of property testing to consider the testability of relational database queries. A primary motivation is the desire to avoid reading an entire database to decide a property thereof. We focus on conjunctive queries, which are the most basic and heavily studied database queries. Each conjunctive query can be represented as a relational structure such that deciding if the conjunctive query is satisfied by a relational structure is equivalent to deciding if there exists a homomorphism from to . We phrase our results in terms of homomorphisms. Precisely, we study, for each relational structure , the testability of homomorphism inadmissibility from . We consider algorithms that have oracle access to an input relational structure and that distinguish, with high probability, the case where there is no homomorphism from to , from the case where one needs to remove a constant fraction of tuples from in order to suppress all such homomorphisms. We provide a complete characterization of the structures from which one can test homomorphism inadmissibility with one-sided error by making a constant number of queries to . Our characterization shows that homomorphism inadmissibility from is constant-query testable with one-sided error if and only if the core of is -acyclic. We also show that the injective version of the problem is constant-query testable with one-sided error if is -acyclic; this result generalizes existing results for testing subgraph-freeness in the general graph model.