We investigate the evaluation of conjunctive queries over static and dynamic relations. While static relations are given as input and do not change, dynamic relations are subject to inserts and deletes. We characterise syntactically three classes of queries that admit constant update time and constant enumeration delay. We call such queries tractable. Depending on the class, the preprocessing time is linear, polynomial, or exponential (under data complexity, so the query size is constant). To decide whether a query is tractable, it does not suffice to analyse separately the sub-query over the static relations and the sub-query over the dynamic relations. Instead, we need to take the interaction between the static and the dynamic relations into account. Even when the sub-query over the dynamic relations is not tractable, the overall query can become tractable if the dynamic relations are sufficiently constrained by the static ones.
翻译:本文研究静态关系与动态关系上的合取查询评估问题。静态关系作为输入给定且保持不变,而动态关系则面临插入与删除操作。我们通过语法特征刻画了三个可支持常数时间更新与常数时间枚举延迟的查询类,并将此类查询称为可处理查询。不同查询类对应的预处理时间分别为线性、多项式或指数级(基于数据复杂性,即查询规模为常数)。要判定查询是否可处理,仅分别分析静态关系子查询与动态关系子查询并不足够,还需考虑两类关系之间的相互作用。即使动态关系上的子查询本不可处理,若动态关系受到静态关系的充分约束,整体查询仍可能变得可处理。