Comment by MBCook
9 years ago
Right. In Dynamo you could store JSON with "middleName: null" and know that means "We asked, they didn't have it" as opposed to a record without a middleName key which means "we never asked".
9 years ago
Right. In Dynamo you could store JSON with "middleName: null" and know that means "We asked, they didn't have it" as opposed to a record without a middleName key which means "we never asked".
And now you've just discovered why relational databases have a "null" concept that is separate from the "empty string" concept.
In a relational table, all rows in the table have a "middleName" column. So you can't "omit" the column entirely for some rows like you can in a doc/KV store.
"NULL" in a relational DB is to store, in a table where every record has a "middleName" column, the concept of "missing key" from a key/value store type layout.
NULL is the relational DB's way of representing: "a record without a middleName key" exists here.
But my middle name IS null
In other words, you don't have a middle name. Not to be confused with:
> But my middle name IS "null"