该向前看:无空值与无包的查询
Time to Move on: Querying without Nulls and Bags
浏览论文内容
中文总结 AI 辅助
本文主张摒弃SQL中的空值与包,提出可设计基于完全规范化关系、无空值且采用集合语义的查询语言,以解决SQL早期设计决策的不足并挖掘新机遇。
中文摘要 AI 辅助
SQL是数据库社区在语言设计上的成功案例,其成功的关键在于声明性,这使其具备可优化性,极大减轻了程序员的负担。然而,随着查询语言需解决的问题日益复杂,该社区需要重新思考早期查询语言的一些基础设计决策。我们在设计Rel(一种用于端到端关系编程的语言)的经验表明,基于完全规范化的关系来设计、实现并成功部署一种语言是可行的。这类关系避免了Codd所指的“损坏的关系”,即我们通常所说的“包(bags)”,以及被称为“十亿美元级错误”的空值(nulls)。在SQL领域,人们普遍认为包和空值是不可避免的“恶”。我们认为这种“恶”完全可以避免:仔细审视后,为包和空值辩护的理由会消失。除了驳斥这些理由,我们还描述了无空值且采用集合语义的语言所提供的机遇。
英文摘要
SQL is the database community's success story in terms of language design. The key reason for its success is its declarativeness: it gives rise to optimizability, reducing the programmer's burden significantly. However, given the evolving complexity of problems to solve with query languages, our community needs to re-think some of the fundamental early query language design decisions. Our experience in having worked on the design of Rel (a language for end-to-end relational programming) tells us that it is possible to design, implement, and successfully deploy a language based on fully normalized relations. Such relations avoid what Codd called corrupted relations and what we commonly refer to as bags, and the 'harmful' 'billion dollar mistake' that we know as nulls. In the SQL world, it is accepted that bags and nulls are tolerated as an unavoidable evil. We argue that the evil is completely avoidable: reasons offered for justifying bags and nulls evaporate at a closer examination. In addition to debunking them, we also describe opportunities offered by a null-free language with set semantics.