Database Research Group (CIS)

Document Type

Conference Paper

Date of this Version



Postprint version. Copyright ACM, 2009. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in:

Containment of Conjunctive Queries on Annotated Relations. Todd Green. Proceedings of the 12th International Conference on Database Theory 2009 (ICDT 2009), March 23–25, 2009, Saint Petersburg, Russia.

Publisher URL:


We study containment and equivalence of (unions of) conjunctive queries on relations annotated with elements of a commutative semiring. Such relations and the semantics of positive relational queries on them were introduced in a recent paper as a generalization of set semantics, bag semantics, incomplete databases, and databases annotated with various kinds of provenance information. We obtain positive decidability results and complexity characterizations for databases with lineage, why-provenance, and provenance polynomial annotations, for both conjunctive queries and unions of conjunctive queries. At least one of these results is surprising given that provenance polynomial annotations seem “more expressive” than bag semantics and under the latter, containment of unions of conjunctive queries is known to be undecidable. The decision procedures rely on interesting variations on the notion of containment mappings. We also show that for any positive semiring (a very large class) and conjunctive queries without self-joins, equivalence is the same as isomorphism.


database theory, data provenance, query optimization



Date Posted: 08 December 2009

This document has been peer reviewed.