2 ms·
> Should databases have two separate values for unknown or no value? That sounds like a world of hurt, with two types of null. It’s also a non-problem in pract
by jl6 4y ago
> Should databases have two separate values for unknown or no value? That sounds like a world of hurt, with two types of null.
It’s also a non-problem in practice, because if an application needs to distinguish between multiple types of nulls, it can very easily just use an extra column holding the information needed to disambiguate.
- jstanley 4y agoSimilarly, the need for non-boolean columns is a non-problem in practice, because an application can just make an extra column for every bit it needs to store. If it needs strings or arbitrary-width numbers it can just join on other tables that store those bits. (Existence of a workaround doesn't turn a problem into a non-problem)
- jl6 4y agoI stand by it being a non-problem in practice because the workaround is trivial, and the supposed solution adds complexity everywhere. There isn’t even a universally agreed methodology for how to handle nulls in the relational model in theory. It’s a semantic problem that can only be solved with reference to the requirements of a particular use case, and when you do that using explicit extra columns, the problem evaporates.