Hacker News new | ask | show | jobs
by euroderf 932 days ago
The definition and use of markers for missing values belongs in the application, not the database. My 0,02€.
3 comments

It is called Structured Query Language, it allows for complex logic that can be processed close to the data to speed up operations and reduce complexity and increase reliability of client applications. Sure, if you require Google scale of connectivity, it might not work but 99.9999% of people do not and their applications would be simpler, cleaner, more performant and more reliable if they learned and used their database correctly instead of re-implementing all that functionality (but badly) in their application layer.
Agree. Either that or then it's clear that NULL and empty have a different meaning, which in turn means the query should respect that.
While I’m sure NULLs nary be found in the ivory tower, you should know they are pervasive in the rest of the kingdom amongst us common folk.
The comment you're replying to acknowledges this and suggests we plan accordingly.
Even from a “planning” perspective, that comment is about as unconstructive as they come.

How does it suggest we actually go about modeling missing values in the database?

I can think of a dozen ways to go about it and each one has its own tradeoffs and consequences.

When it comes down to it, is actually it worth it? Just so you don’t have to consider NULL scenarios for columns that are marked as nullable?

It seems like a silly overcorrection to me.