Re: Why is database integrity so impopular ?
Date: Mon, 13 Oct 2008 09:17:25 -0700 (PDT)
On Oct 13, 5:24 am, Jon Heggland <jon.heggl..._at_ntnu.no> wrote:
> DBMS_Plumber wrote:
> > Later, over a cocktail or two, we chatted. In his shop EVERY table
> > has a declared primary key, every column without NOT NULL and DEFAULT
> > must have a documented reason for the deviation.
> It is considered a deviation not to have a default? Why is that? I would
> have thought that having defaults for every column would encourage
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'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. Received on Mon Oct 13 2008 - 18:17:25 CEST