Databasen - NULL dates

paddy paddy at
Wed Oct 18 15:09:23 BST 2006

On Wed, Oct 18, 2006 at 01:25:05PM +0100, Nigel Rantor wrote:
> My question was a sanity check to see if there were any really good 
> reasons not to use NULLs for date values that aren't yet known, so 
> thanks for the replies :-)

NULL is a way of saying you haven't got a value/record.

suppose you did store the date in a seperate table, when you do the
join you get a NULL.  NULL is a way of denormalising. 

whereas, if you think of it as a value in the same domain as a date,
say 01-Jan-1970, then you're commiting essentially the same error
as if you used an arbitary value (say 991231) albeit that the 
hole in your foot may be much more interesting ;-)

for example, you should be aware of how NULLs behave in aggregate
operations in SQL like count().

I suspect the question you should be asking is: I have something
that I'd like to record/represent (eg: the difference between a 
date we don't know yet and date we'll never know) how should I do it ?

Perl 6 will give you the big knob. -- Larry Wall

More information about the mailing list