If a person's name is Null then how would it break the database?

I have seen database interfaces (e.g. framework libraries) that return 'null' as a string for null columns. I believe there was a flag that would turn this on or off for debugging. This flag allows developers to easily determine if the empty field was a result of a null value or an empty value. This is a bad setting, especially in production, and would explain the issues explained in the article.

The reverse processing of converting 'null' to a null value should generate an application error for a name field. I would expect this to be rather quickly resolved.


There's a good chance that a good chunk of your confusion stems from the journalist's. The article talks about problems using entire application systems, not just databases. Completely reasonable since this is a piece of writing aimed at mass consumption, but technical details are glossed over or misunderstood by the author.

Likely a number of these issues are caused at the application layer, rather than the DB's API. Magic values are an anti-pattern which is ridiculously hard to stamp out of the industry. Very easily some programmer could have written a condition along the lines of "someone typed 'null'? They must mean there's no value, because that's what null means!" A misguided attempt at preventing SQL injection could also be responsible for the mentioned mistreatment of Null, or the Hawaiian last name which contains a single quote, which is also the standard SQL string delimiter.

An application which incorrectly transforms these values into NULL or an empty string can easily create errors if business logic or DB constraints expect something different. This naturally results in exactly the frustrating user experience described in the article.


The article itself includes a link to a Stack Overflow question that demonstrates the problem; it was in a Flex application where the code:

currentChild.appendChild("Fred");

would append an element containing the word Fred to an XML document but the code:

currentChild.appendChild("null");

would append an empty element, not an element containing the text "null".

XML, per se, does not have a problem with the text value "NULL", so including such text would be no problem. In fact, NULL has no special meaning in XML at all.