• Rune Bivrin (9/24/2010)


    Toreador (9/24/2010)


    Rune Bivrin (9/24/2010)


    However, looking the table in the question I'd probably remove the NULL-ability on the cell phone numbers. Nullable VARCHAR often doesn't make sense. Particularly when they are entered in a classic GUI. How do you diffrentiate between a NULL phone number and a zero-length phone number?

    Surely in this case, an empty string means that they don't have a cell phone, NULL means you don't know whether they have or not.

    NULL could also mean that I know they have a cell phone, but I don't know the number.

    Exactly how often do you encounter a GUI where there's a little check box labeled "Don't know if there's a cell phone"? In a GUI it's just a text box with no text in it, and most of the time it doesn't matter why it's empty because all that's done with the contents is display it in reports and dialog boxes. In those cases NULL is just an annoying special case that adds no value.

    Oh it could be important. Could be an indication that the person inputting the data skipped something and should be reprimanded. Say you have a series of forms that should be filled in to create a new customer. One of those forms contain the cell phone number. Now since the value is null that could mean that one form was skipped which could be bad.

    /T