Daniela Florescu , Alon Levy , Dan Suciu , Query Containment for Conjunctive Queries With Regular Expressions Proceedings of the Symposium on Principles of Database Systems, PODS--98 1998
Abstract: The management of semistructured data has recently received
significant attention because of the need of several applications to
model and query large volumes of irregular data. This paper considers
the problem of query containment for a query language over
semistructured data, StruQL0, that contains the essential feature common
to all such languages, namely the ability to specify regular path
expressions over the data. We show here that containment of StruQL0
queries is decidable. We begin by giving a semantic criterion for
StruQL0 query containment: we show that it suffices to check containment
on only finitely many canonical databases. Second, we give a
syntactic criteria for query containment, based on a notion of
query mappings, which extends containment mappings for
conjunctive queries. Third, we consider a certain fragment of StruQL0
obtained by imposing restrictions on the regular path expressions, and
show that query containment for this fragment of StruQL0 is NP-complete.