|
|
|
|
|
by jandrese
528 days ago
|
|
Is it really desirable to combine "unknown" and "no value" into the same identifier? They seems like very distinct concepts. Using your form example you might have a name field that includes a spot for a suffix (John Doe III) for example that many people would leave blank because they don't have a suffix. In that case you should encode it as a NULL, but if they fail to fill in their family name then that's UNKNOWN. If you do it this way you can avoid some confusion as to what NULL represents. John Doe NULL IS EQUAL John Doe NULL John Doe NULL NOT EQUAL John Doe UNKNOWN John Doe UNKNOWN NOT EQUAL John Doe UNKNOWN Determining if any particular input is NULL or UNKNOWN is a tricky problem, but at least this gets the programmer thinking about it up front and structuring their code to behave in the sanest possible manner. |
|