Skip to main content
Log in

Toward Practical Query Evaluation for Constraint Databases

  • Published:
Constraints Aims and scope Submit manuscript

Abstract

Linear constraint databases (LCDBs) extend relational databases to include linear arithmetic constraints in both relations and queries. A LCDB can also be viewed as a powerful extension of linear programming (LP) where the system of constraints is generalized to a database containing constraints and the objective function is generalized to a relational query containing constraints. Our major concern is query optimization in LCDBs. Traditional database approaches are not adequate for combination with LP technology. Instead, we propose a new query optimization approach, based on statistical estimations and iterated trials of potentially better evaluation plans. The resulting algorithms are not only effective on LCDBs, but also applicable to existing query languages. A number of specific constraint algebra algorithms are also developed: select-project-join for two relations, constraint sort-join and constraint multi-join.

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

  1. M.M. Astrahan, et al. (1976). System R: A Relational Approach to Database Management. ACM Trans. on Database Systems 1:97–137.

    Google Scholar 

  2. F. Afrati, S. Cosmadakis, S. Grumbach & G. Kuper. (1994). Linear versus polynomial constraints in database query languages. In A. Borning, editor, Proc. 2nd International Workshop on Principles and Practice of Constraint Programming, volume 874 of Lecture Notes in Conmputer Science, pages 181–192, Springer Verlag, Rosario, WA.

    Google Scholar 

  3. P.A. Bernstein & N. Goodman. (1981). The Power of Natural Semijoins. SIAM Journal on Computing 10:751–771.

    Google Scholar 

  4. A. Brodsky, J. Jaffar, & M.J. Maher. (1993). Toward Practical Constraint Databases. Proc. 19th International Conference on Very Large Data Bases, Dublin, Ireland.

  5. A. Brodsky., C. Lassez, J.-L Lassez & M.J. Maher. (1995). Separability of Polyhedra for Optimal Filtering of Spatial and Constraint Data. Proc. ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, ACM Press.

  6. A. Brodsky & Y. Kornatzky. (1995). The LyriC language: Quering constraint objects. In Carey and Schneider, editors, Proc. ACM SIGMOD International Conference on Management of Data, San Jose, CA.

  7. M. Baudinet, M. Niezette & P. Wolper. (1991). On the representation of infinite temporal data and queries. In Proc. ACM SIGACT-SIGART-SIGMOD Symp. on Principles of Database Systems.

  8. A. Brodsky & Y. Sagiv. (1989). Inference of monotonicity constraints in datalog programs. Proc. ACM SIGACT-SIGART-SIGMOD Symp. on Principles of Database Systems, pages 190–199. Philadelphia, PA.

  9. A. Brodsky, J. Chen, V. E. Segal & P.A. Exarkhopoulo. (1997). The CCUBE Constraint Object-Oriented Database System. Constraints, this issue. Preliminary version in: Constraint Databases and Applications, Proc. Second International Workshop on Constraint Databases Systems (CDB97), Lecture Notes in Computer Science, pages 134–159, Springer.

  10. A. Brodsky & X.S. Wang. (1995). On approximation-based query evaluation, expensive predicates and constraint objects. In Proc. ILPS95 Workshop on Constraints, Databases and Logic Programming, Portland, OR.

  11. J. Chomicki & T. Imielinski. (1989). Relational Specifications of Infinite Query Answers. Proc. ACM SIG-MOD, pages 174-183.

  12. V.S. Chakravarthy & J. Minker. (1986). Multiple Query Processing in Deductive Databases using Query Graphs. Proc. VLDB, pages 384–391.

  13. D.D. Chamberlin, et al. (1981). Support for Repetitive Transactions and Adhoc Queries in System R. ACM Trans. on Database Systems 6:70–94.

    Google Scholar 

  14. D. Daniels, et al. (1982). An Introduction to Distributed Query Compilation in R*. IBM Research Report RJ3497.

  15. H. Edelsbrunner. (1983). A new approach to rectangle intersections, Part II, International Journal of Computer Mathematics 13:221–229.

    Google Scholar 

  16. P.P. Griffiths, et al. (1979). Access Path Selection in a Relational Database Management System. Proc. SIGMOD, pages 23–34.

  17. A. Guttman. (1984). R-trees: A dynamic index structure for spatial searching. Proc. ACM SIGMOD, pages 47–57.

  18. D.Q. Goldin & P.C. Kanellakis. (1996). Constraint query algebras. Constraints 1:45–83.

    Google Scholar 

  19. S. Grumbach & J. Su. (1995). Dense-order constraint databases. In Proc. ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems.

  20. P.A.V. Hall. (1976). Optimization of a Single Relational Expression in a Relational Database. IBM Journal of Research and Development 20:244–257.

    Google Scholar 

  21. M.R. Hansen, B.S. Hansen., P. Lucas & P. van Emde Boas. (1989). Integrating Relational Databases and Constraint Languages. Computer Languages 14:63–82.

    Google Scholar 

  22. R. Helm., K. Marriott, & M. Odersky. (1991). Constraint-based Query Optimization for Spatial Databases. Proc. 10th PODS, pages 181–191.

  23. J. Jaffar & M. J. Maher. (1994). Constraint Logic Programming: A Survey. Journal of Logic Programming 19&20:503–581.

    Google Scholar 

  24. J. Jaffar, S. Michaylov, P. Stuckey & R. Yap. (1992). The CLP( R ) Language and System. ACMTransactions on Programming Languages 14:339-395.

    Google Scholar 

  25. J. Jaffar & J.-L. Lassez. (1987). Constraint Logic Programming. Proc. Conf. on Principles of Programming Languages, pages 111–119.

  26. J. Jaffar, M.J. Maher, P. Stuckey & R. Yap. (1993). Projecting CLP( < ) Constraints. New Generation Computing 11:449–469.

    Google Scholar 

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

    Google Scholar 

  28. P. Kanellakis, G. Kuper & P. Revesz. (1990). Constraint Query Languages, Journal of Computer and System Sciences(forthcoming). (A preliminary version appeared in Proc. 9th PODS, pages 299–313.)

  29. G.M. Kuper. (1993). Aggregation in constraint databases. In Proc. Workshop on Principles and Practice of Constraint Programming.

  30. D. Kemp & P. Stuckey. (1993). Bottom Up Constraint Logic Programming Without Constraint Solving. Technical Report, Dept. of Computer Science, University of Melbourne.

  31. D. Kemp, K. Ramamohanarao, I. Balbin & K. Meenakshi. (1989). Propagating Constraints in Recursive Deductive Databases. Proc. North American Conference on Logic Programming, pages 981–998.

  32. P. Kanellakis, S. Ramaswamy, D.E. Vengroff & J.S. Vitter. (1993). Indexing for Data Models with Constraints and Classes. Proc. PODS.

  33. F. Kabanza, J.-M. Stevenne & P. Wolper. (1990). Handling infinite temporal data. In Proc. ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems.

  34. J.-L. Lassez. (1990). Querying Constraints. Proc. 9th PODS, pages 288–298.

  35. J.-L. Lassez, T. Huynh & K. McAloon. (1989). Simplification and Elimination of Redundant Linear Arithmetic Constraints. In Proc. North American Conference on Logic Programming, Cleveland, pages 35–51.

  36. A. Levy & Y. Sagiv. (1992). Constraints and Redundancy in Datalog. Proc. 11-th PODS,pages 67-80.

  37. M.J.Maher. (1989). A Transformation System for Deductive Database Modules with Perfect Model Semantics. Proc. 9th Conf. on Foundations of Software Technology and Theoretical Computer Science, Bangalore, India, LNCS 405, pages 89–98. Also in: Theoretical Computer Science 110:377-403.

  38. E.M. McCreight. (1985). Priority Search Trees. SIAM Journal of Computing 14:257-276.

    Google Scholar 

  39. L.F. Mackert & G.M. Lohman. (1986). R* Optimizer Validation and Performance Evaluation for Local Queries. Proc. SIGMOD, pages 84–95.

  40. J. Minker. (1978). Search Strategy and Selection Function for an Inferential Relational System. ACM Trans. on Database Systems 3:1–31.

    Google Scholar 

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

  42. M. Niezette & J.-M. Stevenne. (1992). An efficient symbolic representation of periodic time. In Proc. of First International Conference on Information and Knowledge management.

  43. F.P. Palermo. (1974). A Database Search Problem. in: Information Systems COINS IV, J.T. Tou (Ed), Plenum Press.

  44. R.M. Pecherer. (1975). Efficient Evaluation of Expressions in a Relational Algebra. Proc. ACMPacific Conf., pages 44–49.

  45. J. Paredaens, J. Van den Bussche & D. Van Gucht. (1994). Towards a theory of spatial database queries. In Proc. ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems.

  46. R. Ramakrishnan. (1991). Magic Templates: A Spellbinding Approach to Logic Programs. Journal of Logic Programming, 11:189-216.

    Google Scholar 

  47. P.Z. Revesz. (1993). A closed form for datalog queries with integer order. Theoretical Computer Science 116:pp.

  48. P.Z. Revesz. (1995). Datalog queries of set constraint databases. In Proc. International Conference on Database Theory.

  49. N. Roussopoulos & D. Leifker. (1985). Direct spatial search on pictorial databases using packed R-trees. Proc. ACM SIGMOD, pages 17–31.

  50. H.W. Six & D. Wood. (1982). Counting and reporting intersections of d-ranges. IEEE Trans. Computing C-31:181–187.

    Google Scholar 

  51. C.Tollu, S. Grumbach & J. Su. (1995). Linear constraint databases. In Proc. LCC; To appear in LNCS Springer-Verlag volume.

  52. J.M. Smith & P.Y. Chang. (1975). Optimizing the Performance of a Relational Algebra Database Interface. Communications of the ACM 18:568–579.

    Google Scholar 

  53. T. Sellis, N. Roussopoulos & C. Faloutsus. (1987). The R+-tree: A dynamic index for multidimensional objects. Proc. 13th Int. Conf. Very Large Data Bases, pages 507–518.

  54. D. Srivastava. (1992). Subsumption and Indexing in Constraint Query Languages with Linear Arithmetic Constraints. Annals of Mathematics and Artificial Intelligence, to appear.

  55. D. Srivastava & R. Ramakrishnan. (1992). Pushing Constraint Selections. Proc. 11th PODS, pages 301–315.

  56. D. Srivastava, R. Ramakrishnan & P. Revesz. (1994). Constraint objects. In Proc. 2nd Workshop on the Principles and Practice of Constraint Programming, Orcas Island, WA.

  57. L. Vandeurzen, M. Gyssens & D. Van Gucht. (1995). On the desirability and limitations of linear spatial query languages. In M. J. Egenhofer and J. R. Herring, editors, Proc. 4th Symposium on Advances in Spatial Databases, volume 951 of Lecture Notes in Computer Science, pages 14–28. Springer Verlag.

  58. K.-Y. Whang & R. Krishnamurthy. (1990). Query Optimization in a Memory-Resident Domain Relational Calculus Database System. ACM Trans. on Database Systems 15: 67–95.

    Google Scholar 

  59. E. Wong & K. Youssefi. (1976). Decomposition - A Strategy for Query Processing. ACMTrans. on Database Systems 1:223–241.

    Google Scholar 

  60. M. Yannakakis (1981). Algorithms for Acyclic Database Schemes. Proc. VLDB, pages 82–94.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Brodsky, A., Jaffar, J. & Maher, M.J. Toward Practical Query Evaluation for Constraint Databases. Constraints 2, 279–304 (1997). https://doi.org/10.1023/A:1009795512753

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1009795512753

Navigation