Null vs. Empty

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Nov 14 00:50:52 CST 2004


On 11/13/04 10:52 PM, "Frank Schima" <frank-list3 at mindstarprods.com> wrote:

> Hi guys,
> 
> 
> Think of NULL as undefined or unknown. The len() of a Null text field
> is not defined/unknown and hence not zero. This is standard SQL
> database behavior - it is also the logical behavior when you think
> about it. The standard logic matrices for True, False and AND, OR XOR,
> etc. can be extended to include NULLs.
> 
> The bottom line is that you, the developer, have to define what *you*
> want to do with NULLs for your particular application.
> 
> So standard SQL practice to look for empty or NULL strings is the
> following:
> 
>     SELECT MyTextField
>     FROM MyTable
>     WHERE len(MyTextField) = 0 OR MyTextField is NULL
> 
> You could just not allow NULLs for the field. Or make sure that every
> time a record is added that it be set to an empty string by default.
> 
> Ruslan, in Valentina 2, can we remove the NULL flag from a Text field?

May be yes, not sure.

In any case BLOB fields do NOT use additional bit to keep info about NULL.

Internal BLOB's format allow us always say: this is NULL.

You see?


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




More information about the Valentina-beta mailing list