Databasen - NULL dates

Jacqui Caren jacqui.caren at ntlworld.com
Thu Oct 19 09:22:32 BST 2006


Nigel Rantor wrote:
> 
> So, have been interviewing DB types lately, looking for a Guru.
> 
> We got into a discussion about whether or not to use NULL values for 
> dates that are as-yet-unknown. anyone have strong feelings and arguments 
> either way?
> 
> Interested to see where people stand.

Null is correct for this usage however often NULL cannot be indexed
and a derived (indexable) field holding some form of is-date-set
flag is used where performance requires this. I consider adding
such a field a 'workaround/hack' but have done it.

I have seen use of 'marker' dates in the past but this has been with
antique DBs that impose that limitation - for instance MySQL imposing
not NULL self ref's - which made life hell for me some time back.

Jacqui

p.s. IMHO use of self ref tables is another often contentious issue.
use of "select start with connect by" or similar is a side issue.


More information about the london.pm mailing list