Re: Why is database integrity so impopular ?
Date: Wed, 15 Oct 2008 12:46:14 +0200
> If you mandate that a column cannot contain a NULL, setting a DEFAULT
> means that when a programmer legitimately doesn't have a value for the
> column they aren't obliged to put in there the first thing that
> springs to mind.
I would have thought the effect was the opposite: If programmers (or anyone else, of course---I consider myself a programmer:) aren't obliged to specify a value (and thus aren't required to understand what the column is for), they will happily go with a default that may very well be inappropriate/incorrect. But without empirical evidence, either hypothesis is just speculation.
> I'm sure there would be cases where you could say NOT NULL but not
> provide a DEFAULT. The point to me was that this shop is serious about
> their integrity and this seriousness is manifested in their
> engineering policies and procedures.
Point taken, of course.
-- JonReceived on Wed Oct 15 2008 - 12:46:14 CEST