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-queries over the static relations and over the dynamic relations, respectively. 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.
翻译:本文研究在静态关系与动态关系上评估合取查询的问题。静态关系作为输入给定且不发生变化,而动态关系则可能进行插入和删除操作。我们从句法层面刻画了三类允许常数更新时间与常数枚举延迟的查询,并称此类查询为易处理查询。根据类别不同,预处理时间在数据复杂度下(即查询规模为常数)呈线性、多项式或指数级。判断查询是否易处理时,仅分别分析静态关系子查询与动态关系子查询并不充分,必须综合考虑静态关系与动态关系之间的相互作用。即使动态关系子查询本身不易处理,若动态关系受到静态关系的充分约束,整体查询仍可能具有易处理性。