Some Algorithmic Improvements for the Containment Problem of Conjunctive Queries with Negation

  • Michel Leclère
  • Marie-Laure Mugnier
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4353)


Query containment is a fundamental problem of databases. Given two queries q 1 and q 2, it asks whether the set of answers to q 1 is included in the set of answers to q 2 for any database. In this paper, we investigate this problem for conjunctive queries with negated subgoals. We use graph homomorphism as the core notion, which leads us to extend the results presented in [Ull97] and [WL03]. First, we exhibit sufficient (but not necessary) conditions for query containment based on special subgraphs of q 2, which generalize that proposed in [WL03]. As a corollary, we obtain a case where the time complexity of the problem decreases. From a practical viewpoint, these properties can be exploited in algorithms, as shown in the paper. Second, we propose an algorithm based on the exploration of a space of graphs, which improves existing algorithms.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [ASU79]
    Aho, A.V., Sagiv, Y., Ullman, J.D.: Equivalences among relational expressions. SIAM J. Comput. 8(2), 218–246 (1979)zbMATHCrossRefMathSciNetGoogle Scholar
  2. [CM77]
    Chandra, A.K., Merlin, P.M.: Optimal implementation of conjunctive queries in relational databases. In: 9th ACM Symposium on Theory of Computing, pp. 77–90 (1977)Google Scholar
  3. [Hal01]
    Halevy, A.Y.: Answering queries using views: A survey. VLDB Journal: Very Large Data Bases 10(4), 270–294 (2001)zbMATHCrossRefGoogle Scholar
  4. [Ker01]
    Kerdiles, G.: Saying it with Pictures: a Logical Landscape of Conceptual Graphs. PhD thesis, Univ. Montpellier II / Amsterdam (November 2001)Google Scholar
  5. [LS93]
    Levy, A.Y., Sagiv, Y.: Queries independent of updates. In: VLDB, pp. 171–181 (1993)Google Scholar
  6. [ML06]
    Mugnier, M.L., Leclère, M.: On querying simple conceptual graphs with negation. Data and Knowledge Engineering (DKE) (in press, 2006), doi:10.1016/j.datak.2006.03.008Google Scholar
  7. [Ull89]
    Ullman, J.D.: Principles of Database and Knowledge-Base Systems, vol. II. Computer Science Press (1989)Google Scholar
  8. [Ull97]
    Ullman, J.D.: Information Integration using Logical Views. In: Afrati, F.N., Kolaitis, P.G. (eds.) ICDT 1997. LNCS, vol. 1186, Springer, Heidelberg (1996)Google Scholar
  9. [WL03]
    Wei, F., Lausen, G.: Containment of Conjunctive Queries with Safe Negation. In: Calvanese, D., Lenzerini, M., Motwani, R. (eds.) ICDT 2003. LNCS, vol. 2572, Springer, Heidelberg (2002)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Michel Leclère
    • 1
  • Marie-Laure Mugnier
    • 1
  1. 1.LIRMMUniversité de MontpellierMontpellier cedexFrance

Personalised recommendations