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的大小。我们研究了UCQ的相同问题,以及更受限制的树形CQ的问题。