Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any side effects in allowing NULL?
Message
 
To
01/04/2012 12:35:21
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01539772
Message ID:
01539975
Views:
52
>>>Null means "We don't know"
>
>That's true if you define it that way but it isn't if you don't and therein lies the rub.

And if you don't define as what it is you will have problems. The value of NULL in relational database theory represents a data type with unkown value. It is the dafault when no value is supplied rather than assuming the unknown value is empty for the data type. There is another value that isn't very often support called NIL which not only has an unknown value but also an unknown data type.

Now we can code around the behavior of NULL or we can code for it being what it is. If you code around it you be doing a lot of coding as you will need to adjust every operation in your system to handle a NULL, but if you learn what NULL is and then code for it behaving as it does you will find that in many places you want an unknown value handled just the way NULL is handled and for those where you don't you can code around it.

This discussion about NULL comes up every now and then and each time there are dozens of work arounds given that all try to pretend that NULL is not real or that it needs to be changed before entering operations. If we simply learn what NULL is and then accept it for what it is our coding lives will much easier.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform