Skip to main content

Toward Practical Query Evaluation for Constraint Databases

  • Chapter
Constraints and Databases

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.

Much of this research was conducted while the authors were employed at the I.B.M. Thomas J. Watson Research Center.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview 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.

    Article  Google Scholar 

  2. F. Afrati, S. Cosmadakis, S. Grumbach & G. Kuper.(l 994). 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.

    Article  MathSciNet  MATH  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.

    Google Scholar 

  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.

    Google Scholar 

  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.

    Google Scholar 

  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.

    Google Scholar 

  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.

    Google Scholar 

  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.

    Google Scholar 

  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.

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

  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.

    Article  Google Scholar 

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

    Google Scholar 

  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.

    Google Scholar 

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

    Google Scholar 

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

    Article  MathSciNet  Google Scholar 

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

    Google Scholar 

  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.

    Article  MATH  Google Scholar 

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

    Google Scholar 

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

    Article  MathSciNet  Google Scholar 

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

    Article  Google Scholar 

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

    Google Scholar 

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

    Article  MATH  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.)

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

  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.

    Google Scholar 

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

    Google Scholar 

  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.

    Google Scholar 

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

    Google Scholar 

  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.

    Google Scholar 

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

    Google Scholar 

  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.

    Google Scholar 

  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.

    Google Scholar 

  40. J. Minker.(l 978). 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.

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

  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.

    Google Scholar 

  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.

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

    Google Scholar 

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

    Article  MATH  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.

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

  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.

    Google Scholar 

  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.

    Google Scholar 

  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.

    Article  Google Scholar 

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

    Article  Google Scholar 

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

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer Science+Business Media New York

About this chapter

Cite this chapter

Brodsky, A., Jaffar, J., Maher, M.J. (1997). Toward Practical Query Evaluation for Constraint Databases. In: Ramakrishnan, R., Stuckey, P. (eds) Constraints and Databases. Springer, Boston, MA. https://doi.org/10.1007/978-1-4615-5515-5_3

Download citation

  • DOI: https://doi.org/10.1007/978-1-4615-5515-5_3

  • Publisher Name: Springer, Boston, MA

  • Print ISBN: 978-1-4613-7520-3

  • Online ISBN: 978-1-4615-5515-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics