Re: Why is database integrity so impopular ?

From: paul c <toledobythesea_at_oohay.ac>
Date: Mon, 13 Oct 2008 19:25:52 GMT
Message-ID: <4hNIk.1307$fF3.491_at_edtnps83>


DBMS_Plumber wrote:
> 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
>> sloppiness.
>> --
>> Jon

>
> 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.

Suggest that a DEFAULT value could also be an integrity mechanism, especially for updates to projection views, for example, a "Year" attribute's default might be changed every January 1. This might help isolate apps from the db 'rules', if you will. Received on Mon Oct 13 2008 - 21:25:52 CEST

Original text of this message