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.
翻译:合取查询(CQ)的拟合问题是指构造一个符合给定标记数据样例集的合取查询。当存在拟合CQ时,它通常不唯一。这促使我们提出拟合CQ概念的自然精化,例如最一般拟合CQ、最具体拟合CQ和唯一拟合CQ。我们基于(适当精化的)同态对偶性、边界和直积给出了这些概念的结构性刻画,从而能够构建(当存在时)精化后的拟合CQ。我们还精确指出了相关存在性和验证问题的复杂度,并确定了拟合CQ的大小。我们对UCQ以及更具限制性的树形CQ类研究了相同的问题。