Containment of Relational Queries with Annotation Propagation [chapter]

Wang-Chiew Tan
2004 Lecture Notes in Computer Science  
We study the problem of determining whether a query is contained in another when queries can carry along annotations from source data. We say that a query is annotation-contained in another if the annotated output of the former is contained in the latter on every possible annotated input databases. We study the relationship between query containment and annotation-containment and show that annotation-containment is a more refined notion in general. As a consequence, the usual equivalences used
more » ... y a typical query optimizer may no longer hold when queries can carry along annotations from the source to the output. Despite this, we show that the same annotated result is obtained whether intermediate constructs of a query are evaluated with set or bag semantics. We also give a necessary and sufficient condition, via homomorphisms, that checks whether a query is annotationcontained in another. Even though our characterization suggests that annotation-containment is more complex than query containment, we show that the annotation-containment problem is NP-complete, thus putting it in the same complexity class as query containment. In addition, we show that the annotation placement problem, which was first shown to be NP-hard in [BKT02] , is in fact DP-hard and the exact complexity of this problem still remains open.
doi:10.1007/978-3-540-24607-7_4 fatcat:yomemkai5raoflb47i63qitmna