On some platforms (and even versions), this depends on how the NULL indexes are indexed.
My basic rule for NULL:
A good example of this is address bar modeling. If you have AddressLine1 and AddressLine2, what does this mean that the first has data and the second has NULL? It seems to me that you either know the address or not, and partial NULLs in the dataset just pose problems when someone concatenates them and gets NULL (ANSI behavior). You can solve this problem by resolving NULL and adding a control constraint - either all the address information will be NULL or not.
A similar thing with an average initial / name. Some do not. Is this different from the fact that it is unknown, and you do not care?
Also, date of death - what does NULL mean? Not dead? Unknown date of death? Many times, one column is not enough to encode domain knowledge.
So, for me, whether to allow NULL has a very strong influence on semantics data - performance will be second, because if the data is misinterpreted (potentially by many different people), it is usually a much more expensive problem than performance.
This may seem like a small thing (in SQL Server, an implementation is a bitmask stored in a string), but only with NULL permission after justification does it seem to me to work better. It catches things at an early stage of development, makes you consider assumptions and understand your problem area.
Cade Roux Jun 19 '10 at 15:51 2010-06-19 15:51
source share