The fitting problem for conjunctive queries (CQs) is the problem to construct a CQ that fits a given set of labeled data examples. When a fitting CQ exists, it is in general not unique. This leads us to proposing natural refinements of the notion of a fitting CQ, such as most-general fitting CQ, most-specific fitting CQ, and unique fitting CQ. We give structural characterizations of these notions in terms of (suitable refinements of) homomorphism dualities, frontiers, and direct products, which enable the construction of the refined fitting CQs when they exist. We also pinpoint the complexity of the associated existence and verification problems, and determine the size of fitting CQs. We study the same problems for UCQs and for the more restricted class of tree CQs.
翻译:搭配查询(CQs)的恰当问题是建立一个符合特定一组标签数据实例的CQ的问题。当一个合适的CQ存在时,它一般并不独特。这导致我们提出对合适的CQ概念的自然改进,例如最通用的CQ、最具体的CQ、最具体的CQ和独特的合适CQ。我们从(适合改进的)同质性二元性、边界和直接产品的角度对这些概念进行结构性定性,以便能够在存在时建造精密的CQ。我们还确定相关存在和核查问题的复杂性,并确定CQ的大小。我们研究UCQs和较受限制的树类CQs的相同问题。