We study the question of when we can provide direct access to the k-th answer to a Conjunctive Query (CQ) according to a specified order over the answers in time logarithmic in the size of the database, following a preprocessing step that constructs a data structure in time quasilinear in database size. Specifically, we embark on the challenge of identifying the tractable answer orderings, that is, those orders that allow for such complexity guarantees. To better understand the computational challenge at hand, we also investigate the more modest task of providing access to only a single answer (i.e., finding the answer at a given position), a task that we refer to as the selection problem, and ask when it can be performed in quasilinear time. We also explore the question of when selection is indeed easier than ranked direct access. We begin with lexicographic orders. For each of the two problems, we give a decidable characterization (under conventional complexity assumptions) of the class of tractable lexicographic orders for every CQ without self-joins. We then continue to the more general orders by the sum of attribute weights and establish the corresponding decidable characterizations, for each of the two problems, of the tractable CQs without self-joins. Finally, we explore the question of when the satisfaction of Functional Dependencies (FDs) can be utilized for tractability, and establish the corresponding generalizations of our characterizations for every set of unary FDs.
翻译:我们研究一个问题,即我们何时能够根据时间对数在数据库大小上构建一个时间准线性数据结构的预处理步骤,根据时间对数回答的指定顺序直接访问连接查询(CQ)的 k- 答案。具体地说,我们开始挑战,确定可移植的回答命令,即允许这种复杂保证的那些命令。为了更好地理解目前计算的挑战,我们还调查了仅提供单一答案(即,在特定位置找到答案)这一较微小的任务,我们称之为选择问题,并询问何时可以在准线性时间进行数据结构。我们还探讨选择何时确实比直接访问排序容易的问题。我们从地名录顺序开始。对于这两个问题中的每一问题,我们给每个CQ(没有自我合并的常规复杂性假设)一个可调整的分类顺序的定性。然后我们继续用两个更笼统的顺序来计算一个单一答案(即,在特定位置上找到答案),这个任务被称为选择问题,在准线时间里的时间里问何时可以进行。我们还探讨选择何时真正比直接访问容易的问题。我们从地开始,对于每一个问题都给出了可调整的自定义性结论性的问题。