Subject Re: [firebird-support] Re: seems bug : Field accepts NULL Values (empty string) even if it is defined w
Author David Cornelius
Jonathan Neve wrote:
>>
>> Nope, in a real, practical application, '' and NUL mean two very
>> different things, whether you're using SQL or not.
>>
> Well, I guess what you're saying is that it's inevitable, because
> existing systems already work that way (make this distinction). But
> still, you must agree that in practice this distinction isn't very
> useful...
>

No--it's actually very useful for any data type.

Here's a real-world example of how NULLs were very useful and distinct from
blank strings: I worked for a hospital developing research programs for
gathering data. It was important to know that as much information as possible
had been gathered for each subject being studied. If a piece of information
was gathered, the field value was set, if it had not been gathered, it was
left at NULL. Therefore, a report could be written to see what fields had not
been gathered by simply checking to see if the field was NULL or not. A lot
of the fields were numeric, but some were string. It was stressed to me over
and over when I first started there and had some of these same questions how
important NULLs really are.

Just like someone else was stating, if we had been unable to set the fields to
NULL, we would've had to have had a separate field for each value we were
collecting to declare it's possible NULL state.


Regards,

--
David Cornelius
CorneliusConcepts.com