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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
M.M. Astrahan, et al.(1976). System R: A Relational Approach to Database Management. ACM Trans, on Database Systems 1:97–137.
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.
P.A. Bernstein & N. Goodman.(1981). The Power of Natural Semijoins. SIAM Journal on Computing 10:751–771.
A. Brodsky, J. Jaffar, & M.J. Maher.(1993). Toward Practical Constraint Databases. Proc. 19th International Conference on Very Large Data Bases, Dublin, Ireland.
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.
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.
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.
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.
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.
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.
J. Chomicki & T. Imielinski.(1989). Relational Specifications of Infinite Query Answers. Proc. ACM SIGMOD, pages 174–183.
V.S. Chakravarthy & J. Minker.(1986). Multiple Query Processing in Deductive Databases using Query Graphs. Proc. VLDB, pages 384–391.
D.D. Chamberlin, et al.(1981). Support for Repetitive Transactions and Adhoc Queries in System R. ACM Trans. on Database Systems 6:70–94.
D. Daniels, et al.(1982). An Introduction to Distributed Query Compilation in R*. IBM Research Report RJ3497.
H. Edelsbrunner.(1983). A new approach to rectangle intersections, Part II, International Journal of Computer Mathematics 13:221–229.
P.P. Griffiths, et al.(1979). Access Path Selection in a Relational Database Management System. Proc. SIGMOD, pages 23–34.
A. Guttman.(1984). R-trees: A dynamic index structure for spatial searching. Proc. ACM SIGMOD, pages 47–57.
D.Q. Goldin & P.C. Kanellakis.(1996). Constraint query algebras. Constraints 1:45–83.
S. Grumbach & J. Su.(1995). Dense-order constraint databases. In Proc. ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems.
P.A.V. Hall.(1976). Optimization of a Single Relational Expression in a Relational Database. IBM Journal of Research and Development 20:244–257.
M.R. Hansen, B.S. Hansen., P. Lucas & P. van Emde Boas.(1989). Integrating Relational Databases and Constraint Languages. Computer Languages 14:63–82.
R. Helm., K. Marriott, & M. Odersky.(1991). Constraint-based Query Optimization for Spatial Databases. Proc. 10th PODS, pages 181–191.
J. Jaffar & M. J. Maher.(1994). Constraint Logic Programming: A Survey. Journal of Logic Programming 19&20:503–581.
J. Jaffar, S. Michaylov, P. Stuckey & R. Yap.(1992). The CLP(R) Language and System. ACM Transactions on Programming Languages 14:339–395.
J. Jaffar & J.-L. Lassez.(1987). Constraint Logic Programming. Proc. Conf on Principles of Programming Languages, pages 111–119.
J. Jaffar, M.J. Maher, P. Stuckey & R. Yap.(1993). Projecting CLP(ℜ) Constraints. New Generation Computing 11:449–469.
A. Klug.(1988). On Conjunctive Queries Containing Inequalities. JACM 35:146–160.
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.)
G.M. Kuper.(1993). Aggregation in constraint databases. In Proc. Workshop on Principles and Practice of Constraint Programming.
D. Kemp & P. Stuckey.(1993). Bottom Up Constraint Logic Programming Without Constraint Solving. Technical Report, Dept. of Computer Science, University of Melbourne.
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.
P. Kanellakis, S. Ramaswamy, D.E. Vengroff & J.S. Vitter.(1993). Indexing for Data Models with Constraints and Classes. Proc. PODS.
F. Kabanza, J.-M. Stevenne & P. Wolper.(1990). Handling infinite temporal data. In Proc. ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems.
J.-L. Lassez.(1990). Querying Constraints. Proc. 9th PODS, pages 288–298.
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.
A. Levy & Y. Sagiv.(1992). Constraints and Redundancy in Datalog. Proc. 11-th POAS, pages 67–80.
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.
E.M. McCreight.(1985). Priority Search Trees. SIAM Journal of Computing 14:257–276.
L.F. Mackert & G.M. Lohman.(1986). R* Optimizer Validation and Performance Evaluation for Local Queries. Proc. SIGMOD, pages 84–95.
J. Minker.(l 978). Search Strategy and Selection Function for an Inferential Relational System. ACM Trans. on Database Systems 3:1–31.
I.S. Mumick, S.J. Finkelstein, H. Pirahesh & R. Ramakrishnan.(1990). Magic Conditions. Proc. 9th PODS, pages 314–330.
M. Niezette & J.-M. Stevenne.(1992). An efficient symbolic representation of periodic time. In Proc. of First International Conference on Information and nowledge management.
F.P. Palermo.(1974). A Database Search Problem, in: Information Systems COINS IV, J.T. Tou (Ed), Plenum Press.
R.M. Pecherer.(1975). Efficient Evaluation of Expressions in a Relational Algebra. Proc. ACM Pacific Conf, pages 44–49.
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.
R. Ramakrishnan.(1991). Magic Templates: A Spellbinding Approach to Logic Programs. Journal of Logic Programming, 11:189–216.
P.Z. Revesz.(1993). A closed form for datalog queries with integer order. Theoretical Computer Science 116:pp.
P.Z. Revesz.(1995). Datalog queries of set constraint databases. In Proc. International Conference on Database Theory.
N. Roussopoulos & D. Leifker.(1985). Direct spatial search on pictorial databases using packed R-trees. Proc. ACM SIGMOD, pages 17–31.
H.W. Six & D. Wood.(1982). Counting and reporting intersections of d-ranges. IEEE Trans. Computing C-31:181–187.
C. Tollu, S. Grumbach & J. Su.(1995). Linear constraint databases. In Proc. LCC; To appear in LNCS Springer-Verlag volume.
J.M. Smith & P.Y. Chang.(1975). Optimizing the Performance of a Relational Algebra Database Interface. Communications of the ACM 18:568–579.
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.
D. Srivastava.(1992). Subsumption and Indexing in Constraint Query Languages with Linear Arithmetic Constraints. Annals of Mathematics and Artificial Intelligence, to appear.
D. Srivastava & R. Ramakrishnan.(l992). Pushing Constraint Selections. Proc. 11th PODS, pages 301–315.
D. Srivastava, R. Ramakrishnan & P. Revesz.(1994). Constraint objects. In Proc. 2nd Workshop on the Principles and Practice of Constraint Programming, Orcas Island, WA.
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.
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.
E. Wong & K. Youssefi.(1976). Decomposition—A Strategy for Query Processing. A CM Trans. on Database Systems 1:223–241.
M. Yannakakis (1981). Algorithms for Acyclic Database Schemes. Proc. VLDB, pages 82–94.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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