On the expressibility and the computability of untyped queries

https://doi.org/10.1016/S0168-0072(00)00055-5Get rights and content
Under an Elsevier user license
open archive

Abstract

The work of Chandra and Harel contained in Chandra and Harel (J. Comput. System Sci. 21 (1980) 156–178) can be considered as the beginning of the construction of a theoretical framework in which the computability and the complexity of queries to relational databases could be studied. In the definition of the class CQ of computable queries, the authors included untyped queries, that is, queries whose answers are relations of possibly different arities on different relational structures or databases. However, it seems that in the quite wide and important work which followed on the subject, untyped queries were not considered at all, neither in the abstract machines side (relational machines and reflective relational machines), nor in the logic framework. We propose to re-introduce these queries in the study of query computability and complexity without the need to leave the relational model. One important application which we consider in the theoretical setting is the computation of numerical queries, that is, queries which range over the naturals. Numerical queries do not fit in the current state of the theory regarding the two formalisms referenced above, since they can result in numerical values which are not necessarily in the domain of the given structure. We define an extension of the reflective relational machine of Abiteboul et al. (Proc. 9th IEEE Symp. on Logic in Computer Science, 1994), which we call untyped reflective relational machine, and we prove that this model is complete considering the whole class CQ (i.e., both typed and untyped queries). In the logic framework, we define a new quantifier, which we call conditional quantifier, and we build with it an infinitary logic which we denote by Lω1ωc. The difference between this logic and the well-known infinitary logic Lω1ω is that a formula of our logic can induce relations of different arities on different structures or databases. Then we prove that Lω1ωc strictly includes the whole sub-class of the total computable queries, including untyped queries. Finally, we define a fragment of Lω1ωc which we prove that exactly captures the sub-class of the total computable queries, but which is undecidable. We also define an undecidable fragment of Lω1ω which exactly captures the sub-class of the total and typed computable queries.

Keywords

Query computability
Abstract machines
Abstract logic
Completeness of computation models
Quantifiers

Cited by (0)

1

The work presented here was done during a visit to the Department of Mathematics of the University of Helsinki.

2

This work has been partially supported by Grant 1011049 of the Academy of Finland and by a Grant of Universidad CAECE, Argentina.