Tomas Eklund said:
What you said about "you still have to learn to handle nulls" makes
sense. And I'm starting to see a point in actually using them. What
set me off in the "avoid nulls direction" was this article:
http://www.aspfaq.com/2073
I just read over that article, and I have to say that I disagree with it
quite strongly. While the author is no doubt entitled to his or her
opinion, the majority of points seem to revolve around the essential
viewpoint that Null values don't behave the way the uninitiated expect
them to behave, and therefore should be avoided. (Note: that's my
gloss on the article, not a quote.) However, the behavior of Null is
not random, nor "strange and inconsistent" (as McGoveran and Date are
quoted as saying) -- it is in fact very well defined. It makes pefect
sense to me, and I find it an essential concept in data modeling.
Frankly, I find the the widespread use of dummy values, as the article's
author recommends, abhorrent. I should create artificial values to
represent the fact that there are no values? That's what Null is for!
The only points in that article that I haven't enough information to
argue with are those having to do with data warehousing and OLAP issues.
I don't know enough about the WITH ROLLUP and WITH CUBE clauses to know
whether the problems that the author refers to are true problems, or
just matters that you have to understand before you go writing queries.
I'll reserve judgement on that.
Should you use Null when it isn't appropriate? No. Should you use Null
when it is appropriate? Yes. You'd have to make a much better argument
than that article presents to convince me otherwise.