skip to main content
10.1145/800070.802187acmconferencesArticle/Chapter ViewAbstractPublication PagesstocConference Proceedingsconference-collections
Article
Free Access

Relational queries computable in polynomial time (Extended Abstract)

Published:05 May 1982Publication History

ABSTRACT

Query languages for relational databases have received considerable attention. In 1972 Codd [Cod72] showed that two natural mathematical languages for queries—one algebraic and the other a version of first order predicate calculus—had identical powers of expressibility. Query languages which are as expressive as Codd's Relational Calculus are sometimes called complete. This term is misleading, however, because many interesting queries are not expressible in “complete” languages.

In this paper we show:

Theorem 2: The Fixpoint Hierarchy collapses at the first fixpoint level.

That is, any query expressible with several applications of least fixpoint can already be expressed with one. We also show:

Theorem 1: Let L be a query language consisting of relational calculus plus the least fixpoint operator. Suppose that L contains a relation symbol for a total ordering relation on the domain (e.g. lexicographic ordering). Then the queries expressible in L are exactly the queries computable in polynomial time.

Theorem 1 was discovered independantly by M. Vardi [Var82]. It gives a simple syntactic categorization of those queries which can be answered in polynomial time. Of course queries requiring polynomial time in the size of the database are usually prohibitatively expensive. We also consider weaker languages for expressing less complex queries.

References

  1. 1.Aho,A., Hopcroft, J., Ullman,J., The Design and Analysis of Computer Algorithms, Addison-Wesley, 1974. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.Aho,A., Ullman,J.D., "Universality of Data Retrieval Languages," 6thSymp. on Principles of Programming Languages, 1979, pp. 110-117. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.Chandra,A., "Programming Primitives for Database Languages," 8th Symp. on Principles of Programming Languages, 1981, pp. 50-62. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.Chandra,A., Harel,D., "Computable Queries for Relational Databases," JCSS, Vol. 21, No. 2, October, 1980, 156-178.Google ScholarGoogle ScholarCross RefCross Ref
  5. 5.Chandra,A., Harel,D., "Structure and Complexity of Relational Queries," 21st Symp. on Foundations of Computer Science, 1980, pp: 337-347.Google ScholarGoogle Scholar
  6. 6.Chandra,A.,Harel,D., "Horn Clause and the Fixpoint Query Hierarchy," to appear.Google ScholarGoogle Scholar
  7. 7.Codd,E.F., "Relational Completeness of Database Sublanguages," in Database Systems, R.Rustin, ed., Prentice-Hall, 1972, pp. 65-98.Google ScholarGoogle Scholar
  8. 8.Enderton,H., A Mathematical Introduction to Logic, Academic Press, 1972.Google ScholarGoogle Scholar
  9. 9.Harel, David, personal communication.Google ScholarGoogle Scholar
  10. 10.Immerman,N., "Upper and Lower Bounds for First Order Expressibility," 21st Symp. on Foundations of Computer Science, 1980, pp. 74-82.Google ScholarGoogle Scholar
  11. 11.Immerman,N., "Number of Quantifiers is Better than Number of Tape Cells," JCSS, Vol. 22, No. 3, June, 1981, pp. 384-406.Google ScholarGoogle ScholarCross RefCross Ref
  12. 12.Immerman,N., "Upper and Lower Bounds for First Order Expressibility," to appear in JCSS. 1982.Google ScholarGoogle Scholar
  13. 13.Ullman,J.D., Introduction to Database Systems, Computer Science Press, 1980.Google ScholarGoogle Scholar
  14. 14.Vardi,M., "Complexity of Relational Query Languages," this volume.Google ScholarGoogle Scholar

Index Terms

  1. Relational queries computable in polynomial time (Extended Abstract)

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        STOC '82: Proceedings of the fourteenth annual ACM symposium on Theory of computing
        May 1982
        408 pages
        ISBN:0897910702
        DOI:10.1145/800070

        Copyright © 1982 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 5 May 1982

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        Overall Acceptance Rate1,469of4,586submissions,32%

        Upcoming Conference

        STOC '24
        56th Annual ACM Symposium on Theory of Computing (STOC 2024)
        June 24 - 28, 2024
        Vancouver , BC , Canada

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader