跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 数据库

arXiv:2012.13198 (cs)
[提交于 2020年12月24日 (v1),最后修订于 2022年2月23日 (此版本, v2)]

标题:Handling SQL Nulls with Two-Valued Logic

作者:Leonid Libkin, Liat Peterfreund
查看论文《Handling SQL Nulls with Two-Valued Logic》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:The design of SQL is based on a three-valued logic (3VL), rather than the familiar Boolean logic. 3VL adds a truth value unknown to true and false to handle nulls. Viewed as indispensable for SQL expressiveness, it is at the same time much criticized for unintuitive behavior of queries and being a source of programmer mistakes. We show that, contrary to the widely held view, SQL could have been designed based on the standard Boolean logic, without any loss of expressiveness and without giving up nulls. The approach itself follows SQL's evaluation, which only retains tuples for which conditions in WHERE evaluate to true. We show that conflating unknown with false leads to an equally expressive version of SQL that does not use the third truth value. Queries written under the two-valued semantics can be efficiently translated into the standard SQL and thus executed on any existing RDBMS. These results cover the core of the SQL 1999 Standard: SELECT-FROM-WHERE-GROUP BY-HAVING queries extended with subqueries and IN/EXISTS/ANY/ALL conditions, and recursive queries. We also investigate new optimization rules enabled by the two-valued SQL, and show that for many queries, including most of those found in benchmarks such as TPC-H and TPC-DS, there is no difference between three- and two-valued versions.
主题: 数据库 (cs.DB)
引用方式: arXiv:2012.13198 [cs.DB]
  (或者 arXiv:2012.13198v2 [cs.DB] 对于此版本)
  https://doi.org/10.48550/arXiv.2012.13198
相关 DOI: https://doi.org/10.1145/3584372.3588661

提交历史

来自:Liat Peterfreund
[v1] 2020年12月24日 星期四 11:21:55 UTC
[v2] 2022年2月23日 星期三 16:22:39 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs
< 上一篇   |   下一篇 >
最新 | 近期 | 2022-02
切换浏览方式为:
cs.DB

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站