arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2401.04758cs.DBcs.HCcs.LO
收藏

论关系图的合理有效性:解释关系查询模式与关系语言的模式表达能力

On The Reasonable Effectiveness of Relational Diagrams: Explaining Relational Query Patterns and the Pattern Expressiveness of Relational Languages

Wolfgang Gatterbauer, Cody Dunne

AI总结:

本文首次提出独立于语言的关系查询模式语义定义,并据此构建语言模式表达能力层级,同时提出Relational Diagrams图示表示,使用户能比SQL更快更准地识别模式。

摘要:

通过逻辑表达能力来比较关系语言已被充分理解。然而,如何根据表示关系查询模式的能力来比较关系语言,却鲜为人知。实际上,除了“编写查询的某种方式”之外,查询模式究竟是什么?又如何跨越过程式和声明式语言来定义查询模式,而不受其语法的影响?据我们所知,我们通过使用查询的关系表之间保持结构的映射变体,首次给出了关系查询模式的语义定义。这一形式化方法使我们能够分析关系语言片段的相对模式表达能力,并创建一个逻辑表达能力相同但模式表达能力不同的语言层级。值得注意的是,对于非析取语言片段,我们证明了关系演算能够比关系代数的基本运算符表达更大类别的模式。我们独立于语言的查询模式定义为辅助数据库用户开辟了新途径。例如,可以利用这些模式创建视觉查询表示,以忠实地表示查询模式,加快解释速度,并在查询编辑过程中提供视觉反馈。作为具体示例,我们提出了Relational Diagrams,这是一种安全关系演算的完备且可靠的图示表示,可证明其(i)无歧义,(ii)关系完备,且(iii)能够表示非析取查询并集的所有查询模式。在我们所知的所有关系查询图示表示中, ours是唯一具备这三个特性的。此外,我们匿名预注册的用户研究表明,与SQL相比,Relational Diagrams允许用户以明显更快的速度和更高的准确度识别模式。

英文摘要:

Comparing relational languages by their logical expressiveness is well understood. Less well understood is how to compare relational languages by their ability to represent relational query patterns. Indeed, what are query patterns other than "a certain way of writing a query"? And how can query patterns be defined across procedural and declarative languages, irrespective of their syntax? To the best of our knowledge, we provide the first semantic definition of relational query patterns by using a variant of structure-preserving mappings between the relational tables of queries. This formalism allows us to analyze the relative pattern expressiveness of relational language fragments and create a hierarchy of languages with equal logical expressiveness yet different pattern expressiveness. Notably, for the non-disjunctive language fragment, we show that relational calculus can express a larger class of patterns than the basic operators of relational algebra. Our language-independent definition of query patterns opens novel paths for assisting database users. For example, these patterns could be leveraged to create visual query representations that faithfully represent query patterns, speed up interpretation, and provide visual feedback during query editing. As a concrete example, we propose Relational Diagrams, a complete and sound diagrammatic representation of safe relational calculus that is provably (i) unambiguous, (ii) relationally complete, and (iii) able to represent all query patterns for unions of non-disjunctive queries. Among all diagrammatic representations for relational queries that we are aware of, ours is the only one with these three properties. Furthermore, our anonymously preregistered user study shows that Relational Diagrams allow users to recognize patterns meaningfully faster and more accurately than SQL.

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

↑