This paper is an attempt at laying the foundations for the classification of queries on relational data bases according to their structure and their computational complexity. Using the operations of composition and fixpoints, a Σ-Π hierarchy of height, ω2, called the fixpoint query hierarchy, is defined, and its properties investigated. The hierarchy includes most of the queries considered in the literature including those of Codd and Aho and Ullman. The hierarchy to level ω characterizes the first-order queries, and the levels up to ω are shown to be strict. Sets of queries larger than the fixpoint query hierarchy are obtained by considering the queries computable in polynomial time, queries computable in polynomial space, etc. It is shown that classes of queries defined from such complexity classes behave (with respect to containment) in a manner very similar to the corresponding complexity classes. Also, the set of second-order queries turns out to be the same as the set of queries defined from the polynomialtime hierarchy. Finally, these classes of queries are used to characterize a set of queries defined from language considerations: those expressible in a programming language with only typed (or ranked) relation variables. At the end of the paper is a list of symbols used therein.
[1]
Alfred V. Aho,et al.
Equivalences Among Relational Expressions
,
1979,
SIAM J. Comput..
[2]
Ashok K. Chandra,et al.
Optimal implementation of conjunctive queries in relational data bases
,
1977,
STOC '77.
[3]
David Harel,et al.
Computable Queries for Relational Data Bases
,
1980,
J. Comput. Syst. Sci..
[4]
Alfred V. Aho,et al.
Universality of data retrieval languages
,
1979,
POPL.
[5]
Ronald Fagin,et al.
Monadic generalized spectra
,
1975,
Math. Log. Q..
[6]
Jr. Hartley Rogers.
Theory of Recursive Functions and Effective Computability
,
1969
.
[7]
Larry J. Stockmeyer,et al.
The Polynomial-Time Hierarchy
,
1976,
Theor. Comput. Sci..
[8]
A. Ehrenfeucht.
An application of games to the completeness problem for formalized theories
,
1961
.