Comment by lucio
9 years ago
Treating the empty string as NULL, as ORACLE does, is the sane option on real world problems. Having "" different from NULL creates a lot of problems and the advantages are minimal. As you say, in the rare cases that you must tell WHY it is null, it is better to have a separated Boolean field, than to store "" vs NULL and give a meaning to each one.
One of the first problems that you'll encounter if you use a DB with "" != NULL is at data display, because the natural display for NULL and "" are "an empty cell". Then you cannot tell if it is NULL or ""... then you must display something else for NULL... then...
You have no such problem if "" is NULL, an empty cell always means NULL
They're different, and they mean different things. NULL means "I don't know this", whereas "" means "I know this is empty".
Data display with NULL != "" is easy, do what SSMS does and italicise/otherwise highlight the NULL.
What problems does "" being different to NULL cause?
> Having "" different from NULL creates a lot of problems and the advantages are minimal.
My experience is the exact opposite.
I can think of one way to display the data... JSON.