Containment of conjunctive queries with built-in predicates with variables and constants over any ordered domain
In this paper, we consider conjunctive queries with built-in predicates of the form X < Y, X ≤ Y, X = Y, or X ⊋ Y, where X and Y are variables or constants from a totally ordered domain. We present a sufficient and necessary condition to test containment among these kinds of queries. Klug  left the problem open for the case when the domain is nondense, like the integers. Ullman  gave only a sufficient condition for the containment of conjunctive queries with built-in predicates and integer variables. Our test is based in a method that uses a new idea: the representation of an infinite number of databases by a finite set of, what we call, canonical databases, that use variables that denote uninterpreted constants.
Unable to display preview. Download preview PDF.
- 1.A.V. Aho, Y. Sagiv, and J.D. Ullman. “Equivalence of Relational Expressions”. SIAM J. of Computing 8:2, pp. 218–246.Google Scholar
- 2.A.V. Aho, Y. Sagiv, and J.D. Ullman. “Efficient Optimization of a Class of Relational Queries”. ACM TODS 4:4, pp. 435–454.Google Scholar
- 3.Brisaboa, N.R., “Inclusión de Consultas Conjuntivas en la semántica de bolsas”, Ph.D. Dissertation, Departamento de Computación, Facultade de Informática, Universidade da Coruña, A Coruña, Spain, May 1997.Google Scholar
- 4.Brisaboa, N.R., Hernández, H.J. Testing bag-containment of conjunctive queries, Acta Informatica, 34, 1997. Springer-Verlag, Munich, Germany,pp. 557–578.Google Scholar
- 5.A.K. Chandra and P.M. Merlin. “Optimal implementation of conjunctive queries in relational databases”. Proc. of 9th ACM Symposium on Theory of Computing, New York, NY, 1977, pp. 77–90.Google Scholar
- 6.S. Chaudhuri, M Vardi. “Optimization of Real Conjunctive Queries,” Proc. Twelfth ACM SIGACT-SIGMOD-SIGART Symp. on Principles of Database Systems, Washington, DC, May 1993, pp. 59–70.Google Scholar
- 7.O. Ibarra, J. Su. “On the containment and equivalence of database queries with linear constraints”. PODS’97, Tucson, Arizona, 1997, pp. 32–43.Google Scholar
- 9.J. W. Lloyd. Foundations of Logic Programming, Second, Extended edition, Springer-Verlag 1987.Google Scholar
- 10.Ullman, J. D.: Principles of Database Systems, Second Edition, Computer Science Press, 1982.Google Scholar
- 11.Ullman, J. D.: Principles of Database and Knowledge-base Systems, Vols. 1–2, Computer Science Press, 1988–1989.Google Scholar