使用表与关系理论验证SQL查询
Verifying SQL Queries using Theories of Tables and Relations
AI总结:
本文提出SMT理论的一阶和二阶扩展,用于表示和分析含连接、投影、选择操作的SQL查询,支持包与集合语义及空值推理,并在cvc5中实现求解器,基于公开基准进行了评估。
摘要:
我们提出了对SMT理论的一系列一阶和二阶扩展,专门用于表示和分析包含连接、投影和选择操作的SQL查询。我们支持对具有包(bag)语义或集合(set)语义的数据库表进行SQL查询推理。前者通过有限包理论的扩展实现,后者通过有限关系理论的扩展实现。此外,我们通过引入基于代数数据类型理论扩展的可空类型(nullable sorts)理论,增加了对包含空值(null)的表进行推理的能力。我们在SMT求解器cvc5中实现了这些理论的求解器,并在从公开的SQL等价问题集合派生的基准测试集上进行了评估。
英文摘要:
We present a number of first- and second-order extensions to SMT theories specifically aimed at representing and analyzing SQL queries with join, projection, and selection operations. We support reasoning about SQL queries with either bag or set semantics for database tables. We provide the former via an extension of a theory of finite bags and the latter via an extension of the theory of finite relations. Furthermore, we add the ability to reason about tables with null values by introducing a theory of nullable sorts based on an extension of the theory of algebraic datatypes. We implemented solvers for these theories in the SMT solver cvc5 and evaluated them on a set of benchmarks derived from public sets of SQL equivalence problems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。