Subject | Re: seems bug : Field accepts NULL Values (empty string) even if it is defined w |
---|---|
Author | johnsparrowuk |
Post date | 2004-03-16T13:44:31Z |
I think the designers of the SQL Spec picked a bad name in 'NULL'.
Just looked it up in the dictionary:
"Amounting to nothing : NIL
3 : having no value : INSIGNIFICANT
4 a : having no elements <null set> b : having zero as a limit <null
sequence> c of a matrix : having all elements equal to zero
5 a : indicating usually by a zero reading on a scale when a given
quantity (as current or voltage) is zero or when two quantities are
equal -- used of an instrument b : being or relating to a method of
measurement in which an unknown quantity (as of electric current) is
compared with a known quantity of the same kind and found equal by a
null detector
6 : of, being, or relating to zero
7 : ZERO 1c "
This confuses loads of SQL novices I know - especially when they're
programmers too, ('null pointers' etc, and in C# difference
between 'null' and 'DBNull.Value'!). Personally I always prefer to
say "if (x is DBNull)", more like sql syntax.
SQL should have chosen UNKNOWN as the name of the state, in my
opinion.
However, I agree that Firebird is totally correct in it's handling of
null strings!
John
--- In firebird-support@yahoogroups.com, "David Johnson"
<d_johnson@c...> wrote:
value".
or simply unknown. Then you have to maintain the separate flags, and
you are making the null versus deliberately empty distinction
manually.
Just looked it up in the dictionary:
"Amounting to nothing : NIL
3 : having no value : INSIGNIFICANT
4 a : having no elements <null set> b : having zero as a limit <null
sequence> c of a matrix : having all elements equal to zero
5 a : indicating usually by a zero reading on a scale when a given
quantity (as current or voltage) is zero or when two quantities are
equal -- used of an instrument b : being or relating to a method of
measurement in which an unknown quantity (as of electric current) is
compared with a known quantity of the same kind and found equal by a
null detector
6 : of, being, or relating to zero
7 : ZERO 1c "
This confuses loads of SQL novices I know - especially when they're
programmers too, ('null pointers' etc, and in C# difference
between 'null' and 'DBNull.Value'!). Personally I always prefer to
say "if (x is DBNull)", more like sql syntax.
SQL should have chosen UNKNOWN as the name of the state, in my
opinion.
However, I agree that Firebird is totally correct in it's handling of
null strings!
John
--- In firebird-support@yahoogroups.com, "David Johnson"
<d_johnson@c...> wrote:
> When I first started programming for DBMS I thought so too. Afterten years in the paradigm, I use the distinction all the time.
>empty string means "I have deliberately said that it has an empty
> Null means "I haven't touched it and don't know the value", while
value".
>otherwise be nullable that tells you whether the field is truly empty
> The alternative is to add a flag to every field that would
or simply unknown. Then you have to maintain the separate flags, and
you are making the null versus deliberately empty distinction
manually.
>NULL Values (empty string) even if it is defined w
> ----- Original Message -----
> From: Jonathan Neve
> To: firebird-support@yahoogroups.com
> Sent: Tuesday, March 16, 2004 3:08 AM
> Subject: Re: [firebird-support] Re: seems bug : Field accepts
><jonathan@m...>
>
> Alexander V.Nevsky wrote:
>
> >--- In firebird-support@yahoogroups.com, Jonathan Neve
> >wrote:NULL.
> >
> >
> >>Martijn Tonies wrote:
> >>
> >>
> >>
> >>>You're answering your own question: '' (empty string) is NOT
> >>>NULL is NULL (empty). An empty string is a value. NULL is astate,
> >>>so is "NOT NULL".would
> >>>
> >>>
> >>>
> >>IMHO, this unique feature could nearly be considered a bug...
> >>
> >>
> >
> > In SQL standard? ;)
> >
> >
> Absolutely! A bug in that it defines a useless distinction that
> forever be a nuisance for every database developer! :-)----------
>
> Jonathan Neve.
>
>
> [Non-text portions of this message have been removed]
>
>
>
> --------------------------------------------------------------------
> Yahoo! Groups LinksService.
>
> a.. To visit your group on the web, go to:
> http://groups.yahoo.com/group/firebird-support/
>
> b.. To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
> c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>
>
>
> [Non-text portions of this message have been removed]