Quote:
Originally Posted by healdem
it could also suggest that your design is flawed and the attribute shouldn't be part of the same table.
|
this is a splendid and simple example of the main argument used by people who think NULLs should be avoided completely
"shouldn't be part of the same table" is easy to understand when related to the primary key, because the primary key is exactly what gives the table its unique identity
if you have an attribute that would require a NULL sometimes in this table, then this situation implies that the attribute does not depend on the (entire) primary key
thus you need a (likely related) separate table that does have the appropriate primary key where this attribute will never need to be NULL
now, i personally don't mind NULLs, they can be useful
but i also agree with healdem, when you want to store 1=yes, 0=no, then allowing NULL is a warning flag