arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.09964cs.DBcs.LO
收藏

任意关系演算查询的高效求值

Efficient Evaluation of Arbitrary Relational Calculus Queries

Martin Raszyk, David Basin, Srđan Krstić, Dmitriy Traytel

AI总结:

提出一种将任意关系演算查询转换为安全范围查询并最终映射为SQL的新方法,利用标准数据库管理系统实现高效求值,在时间复杂度和实验表现上均优于现有方法。

摘要:

关系演算(RC)是一种简洁的声明式查询语言。然而,现有的RC查询求值方法效率低下,且经常偏离数据库管理系统中基于有限表的成熟算法。我们设计了一种新的转换方法,将任意RC查询转换为两个安全范围查询,从而保证查询求值结果的有限性。假设在无限域下,这两个查询具有以下含义:第一个查询是封闭的,用于刻画原始查询的相对安全性,即在给定固定数据库时,原始查询是否求值为有限关系。如果原始查询是相对安全的,则第二个安全范围查询与原始查询等价。我们将我们的转换与其他更标准的转换组合,最终获得两个SQL查询。这使我们能够使用标准数据库管理系统来求值任意RC查询。我们证明,我们的转换在时间复杂度上优于现有方法,并在现实和合成实验中得到了实证验证。

英文摘要:

The relational calculus (RC) is a concise, declarative query language. However, existing RC query evaluation approaches are inefficient and often deviate from established algorithms based on finite tables used in database management systems. We devise a new translation of an arbitrary RC query into two safe-range queries, for which the finiteness of the query's evaluation result is guaranteed. Assuming an infinite domain, the two queries have the following meaning: The first is closed and characterizes the original query's relative safety, i.e., whether given a fixed database, the original query evaluates to a finite relation. The second safe-range query is equivalent to the original query, if the latter is relatively safe. We compose our translation with other, more standard ones to ultimately obtain two SQL queries. This allows us to use standard database management systems to evaluate arbitrary RC queries. We show that our translation improves the time complexity over existing approaches, which we also empirically confirm in both realistic and synthetic experiments.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑