Containment of conjunctive queries with built-in predicates with variables and constants over any ordered domain

  • Nieves R. Brisaboa
  • Héctor J. Hernández
  • José R. Paramá
  • Miguel R. Penabad
Regular Papers Query Languages
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1475)


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 [8] left the problem open for the case when the domain is nondense, like the integers. Ullman [11] 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.

Unable to display preview. Download preview PDF.


  1. 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. 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. 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. 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. 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. 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. 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
  8. 8.
    Klug, A., “On conjunctive queries containing inequalities,” J. ACM 35:1, 1988, pp. 146–160.MATHMathSciNetCrossRefGoogle Scholar
  9. 9.
    J. W. Lloyd. Foundations of Logic Programming, Second, Extended edition, Springer-Verlag 1987.Google Scholar
  10. 10.
    Ullman, J. D.: Principles of Database Systems, Second Edition, Computer Science Press, 1982.Google Scholar
  11. 11.
    Ullman, J. D.: Principles of Database and Knowledge-base Systems, Vols. 1–2, Computer Science Press, 1988–1989.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1998

Authors and Affiliations

  • Nieves R. Brisaboa
    • 1
  • Héctor J. Hernández
    • 2
  • José R. Paramá
    • 1
  • Miguel R. Penabad
    • 1
  1. 1.Departamento de ComputaciónUniversidade da CoruñaA CoruñaSpain
  2. 2.Laboratory for Logic, Databases, and Advanced ProgrammingNew Mexico State UniversityLas CrucesUSA

Personalised recommendations