Abstract.
Under the bag-theoretic semantics relations are bags of tuples, that is, a tuple may have any number of duplicates. Under this semantics, a conjunctive query \(Q\) is bag-contained in a conjunctive query \(Q^{\prime }\), denoted \( Q\leq _bQ^{\prime }\), if for all databases \({\cal D}\), \(Q({\cal D})\), the result of applying \(Q\) to \({\cal D}\), is a subbag of \( Q^{\prime }({\cal D)}\). It is not known whether testing \(Q\leq _bQ^{\prime }\) is decidable. In this paper we prove that \(Q\leq _bQ^{\prime }\) can be tested on a finite set of canonical databases built from the body of \(Q\). Using that result we give a procedure that decides the bag-containment problem of conjunctive queries in a large number of cases.
Similar content being viewed by others
Author information
Authors and Affiliations
Additional information
Received: 27 September 1995 / 19 June 1996
Rights and permissions
About this article
Cite this article
Brisaboa, N., Hernández, H. Testing bag-containment of conjunctive queries . Acta Informatica 34, 557–578 (1997). https://doi.org/10.1007/s002360050097
Issue Date:
DOI: https://doi.org/10.1007/s002360050097