Time to Move on: Querying without Nulls and Bags

📅 2026-08-11
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Traditional SQL undermines the theoretical foundations of the relational model by relying on nulls and bags, leading to semantic ambiguities and increased query complexity. This work proposes and implements Rel, a novel declarative query language that entirely eliminates nulls and bags, adhering strictly to set semantics and canonical relational algebra. Through an end-to-end system design and real-world deployment, we demonstrate that a null-free, bag-free relational system is not only expressively complete but also offers significant advantages in optimizability, semantic clarity, and engineering practicality. Our results confirm the feasibility and superiority of this paradigm for real-world applications.
📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

nulls
bags
relational model
query language
set semantics
Innovation

Methods, ideas, or system contributions that make the work stand out.

null-free
set semantics
relational programming
query language design
normalized relations
🔎 Similar Papers
No similar papers found.