Skip to main content
Log in

Constraint query algebras

  • Published:
Constraints Aims and scope Submit manuscript

Abstract

Constraint query languages are natural extensions of relational database query languages. A framework for their declarative specification (constraint calculi) and efficient implementation (low data complexity and secondary storage indexing) was presented in Kanellakis et al., 1995. Constraint query algebras form a procedural language layer between high-level declarative calculi and low-level indexing methods. Just like the relational algebra, this intermediate layer can be very useful for program optimization. In this paper, we study properties of constraint query algebras, which we present through three concrete examples. The dense order constraint algebra illustrates how the appropriate canonical form can simplify expensive operations, such as projection, and facilitate interaction with updates. The monotone two-variable linear constraint algebra illustrates the concept of strongly polynomial operations. Finally, the lazy evaluation of (non)linear constraint algebras illustrates how large numbers of (non)linear constraints could be implemented with only a small amount of costly symbolic processing.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  • Abiteboul, S., Hull, R., Vianu, V. (1994). Foundations of Databases. Addison-Wesley.

  • Agre, L. & Vitter, J.S. (1995). Optimal Interval Management in External Memory. Manuscript, November 1995.

  • Aho, A.V., Hopcroft, J.E. & Ullman, J.D. (1974). The Design and Analysis of Computer Algorithms, Addison-Wesley Publishing Co.

  • Aspvall, B. & Shiloach, Y. (1980). A polynomial time algorithm for solving systems of linear inequalities with two variables per inequality. SIAM J. Comput., 9:4:827–845.

    Google Scholar 

  • Aylamazyan, A.K., Gilula, M.M., Stolboushkin, A.P. & Schwartz, G.F. (1986). Reduction of the Relational Model with Infinite Domain to the Case of Finite Domains. Proc. USSR Acad. of Science (Doklady), 286(2):308–311.

    Google Scholar 

  • Bayer, R. & McCreight, E. (1972). Organization of Large Ordered Indexes. Acta Informatica, 1:173–189.

    Google Scholar 

  • Borning, A.H. (1981). The Programming Language Aspects of ThingLab, A Constraint-Oriented Simulation Laboratory. ACM TOPLAS 3:4:353–387.

    Google Scholar 

  • Brodsky, A., Jaffar, J. & Maher, M.J. (1993). Toward Practical Constraint Databases. Proc. 19th VLDB, 322–331.

  • Chandra, A.K. & Harel, D. (1982). Structure and Complexity of Relational Queries. J. Comp. System Sci., 25:99–128.

    Google Scholar 

  • Chomicki, J., Goldin, D. & Kuper, G. (1996). Variable Independence and Aggregation Closure. Proc. 15th ACM PODS, 40–48.

  • Chomicki, J. & Imielinski, T. (1989). Relational Specifications of Infinite Query Answers. Proc. ACM SIGMOD, 174–183.

  • Codd, E.F. (1970). A Relational Model for Large Shared Data Banks. CACM, 13:6:377–387.

    Google Scholar 

  • Colmerauer, A. (1990). An Introduction to Prolog III. CACM, 33:7:69–90.

    Google Scholar 

  • Dechter, R. (1992). From Local to Global Consistency. Artificial Intelligence, 55:87–107.

    Google Scholar 

  • Dechter, R., Meiri, I. & Pearl, J. (1991). Temporal Constraint Networks. Artificial Intelligence, 49:61–95.

    Google Scholar 

  • Dincbas, M., Van Hentenryck, Simonis, P.H., Aggoun, A., Graf, T. & Berthier, F. (1988). The Constraint Logic Programming Language CHIP. Proc. Fifth Generation Computer Systems, Tokyo.

  • Ferrante, J. & Geiser, J.R. (1977). An Efficient Decision Procedure for the Theory of Rational Order. Theoretical Computer Science, 4:227–233.

    Google Scholar 

  • Freuder, E. (1978). Synthesizing Constraint Expressions. CACM, 21:11.

    Google Scholar 

  • Freuder, E. (1982). A Sufficient Condition for Backtrack-free Search. CACM, 29:1.

    Google Scholar 

  • Grumbach, S. & Su, J. (1995). Dense Order Constraint Databases. Proc. 14th ACM PODS, pp. 66–77.

  • Grumbach, S., Su, J. & Tollu, C. (1994). Linear Constraint Query Languages: Expressive Power and Complexity. Proc. Workshop on Finite Model Theory, Indiana.

  • Hochbaum, D.S. & Naor, J. (1994). Simple and Fast Algorithms for Linear and Integer Programs with Two Variables per Inequality. SIAM J. Comput., 23:6:1179–1192.

    Google Scholar 

  • Jaffar, J. & Lassez, J.L. (1987). Constraint Logic Programming. Proc. 14th ACM POPL, 111–119.

  • Kanellakis, P.C. (1990). Elements of Relational Database Theory. Handbook of Theoretical Computer Science, Vol. B, chapter 17 (J. van Leeuwen editor), North-Holland.

  • Kanellakis, P.C. & Goldin, gnD.Q. (1994). Constraint Programming and Database Query Languages. Symposium on Theoretical Aspects of Computer Software, LNCS 789, pp. 96–120, Sendai, Japan.

  • Kanellakis, P.C., Kuper, G.M. & Revesz, P.Z. (1995). Constraint Query Languages. JCSS, vol. 51: 26–52.

    Google Scholar 

  • Kanellakis, P.C., Ramaswamy, S., Vengroff, D.E. & Vitter, J.S. (1993). Indexing for Data Models with Constraints and Classes. Proc. 12th ACM PODS, 233–243. To appear in JCSS.

  • Klug, A. (1988). On Conjunctive Queries Containing Inequalities. JACM, 35:1:146–160.

    Google Scholar 

  • Koubarakis, M. (1993). Foundations of Temporal Constraint Databases. PhD Thesis. Nat. Tech. Univ. of Athens and Imperial College.

  • Mackworth, A.K. (1977). Consistency in Networks of Relations. AI, 8:1.

    Google Scholar 

  • Montanari, U. (1974). Networks of Constraints: Fundamental Properties and Application to Picture Processing. Information Science, 7.

  • Mumick, I.S., Finkelstein, S.J., Pirahesh, H. & Ramakrishnan, R. (1990). Magic Conditions. Proc. 9th ACM PODS, 314–330.

  • Nelson, G. (1978). An n log n Algorithm for the Two-variable-per-constraint Linear Programming Satisfiability Problem. Technical Report AIM-319, Stanford University.

  • Paredaens, J., van den Bussche, J. & Van Gucht, D. (1995). First-order Queries on Finite Structures over the Reals. Proc. IEEE LICS.

  • Preparata, F.P. & Shamos, M.I. (1985). Computational Geometry: An Introduction. Springer-Verlag.

  • Ramakrishnan, R. (1988). Magic Templates: A Spellbinding Approach to Logic Programs. Proc. 5th International Conference on Logic Programming, 141–159.

  • Ramaswamy, S.& Subramanian, S. (1994). Path Caching: A Technique for Optimal External Searching. Proc. 13th ACM PODS, 14–25.

  • Renegar, J. (1992). On the Computational Complexity and Geometry of the First-order Theory of the Reals: Parts I–III. Journal of Symbolic Computation, 13:255–352.

    Google Scholar 

  • Samet, H. (1990). The Design and Analysis of Spatial Data Structures. Addison-Wesley, Reading MA.

    Google Scholar 

  • Schrijver, A. (1986). Theory of Linear and Integer Programming. John Wiley and Sons.

  • Srivastava, D. & Ramakrishnan, R. (1992). Pushing Constraint Selections. Proc. 11th ACM PODS, 301–316.

  • Steele, G.L. (1980). The Definition and Implementation of a Computer Programming Language Based on Constraints. Ph.D. thesis, MIT, AI-TR 595.

  • Stuckey, P.J. & Sudarshan, S. (1994). Compiling Query Constraints. Proc. 13th ACM PODS, 56–68.

  • Sutherland, I.E. (1963). SKETCHPAD: A Man-Machine Graphical Communication System. Spartan Books.

  • Tarjan, A.E. (1981). A Unified Approach to Path Problems. JACM, 28:3:577–593.

    Google Scholar 

  • Tarski, A. (1951). A Decision Method for Elementary Algebra and Geometry. University of California Press, Berkeley, California.

    Google Scholar 

  • Ullman, J.D. (1982). Principles of Database Systems, 2nd edition. Computer Science Press.

  • Van Hentenryck, P. (1989). Constraint Satisfaction in Logic Programming. MIT Press.

  • Van Hentenryck, P., McAllester, D. & Kapur, D. (1995). Solving Polynomial Systems Using a Branch and Prune Approach. Brown CS Tech. Rep. CS-95-01. To appear in SIAM J. of Numerical Analysis.

  • Vardi, M.Y. (1982). The Complexity of Relational Query Languages. Proc. 14th ACM STOC, 137–146.

  • Yannakakis, M. (1988). Expressing Combinatorial Optimization Problems by Linear Programs. Proc. 20th ACM STOC, 223–228.

Download references

Author information

Authors and Affiliations

Authors

Additional information

Paris C. Kanellakis, one of the authors of this paper, died in a tragic accident shortly after the completion of the first draft. We thank all the reviewers, whose comments were invaluable in helping us complete the work. We also thank Raghu Ramakrishnan for making a last-minute review of the final draft. Research supported by ONR Contracts N00014-94-1-1153 and N00014-91-J-4052, ARPA Order 8225, and by NSF Grant IRI-9509933.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Goldin, D.Q., Kanellakis, P.C. Constraint query algebras. Constraints 1, 45–83 (1996). https://doi.org/10.1007/BF00143878

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF00143878

Keywords

Navigation