Re: How to ensure data consistency?

From: Laconic2 <laconic2_at_comcast.net>
Date: Thu, 9 Sep 2004 02:45:11 -0400
Message-ID: <a7-dndEn-KCAYaLcRVn-rQ_at_comcast.com>


"Marshall Spight" <mspight_at_dnai.com> wrote in message news:42P%c.150624$Fg5.121300_at_attbi_s53...
> "Laconic2" <laconic2_at_comcast.net> wrote in message
news:ap-dndW9qNif0qLcRVn-uQ_at_comcast.com...

> Is the ability to defer constraint checking until commit time
> essential? Should it be controlled by the constraint or by
> the transaction? (That is, should it be the case that one
> specifies to defer checking when one is creating the transaction,
> or does one rather specify of a constraint that it should be
> checked at commit time instead of statement time?)

A DBMS that lacks deferrable constraint checking is lacking a very important feature.
There are certain things that CANNOT be done without it. Mutually prerequisite table entries is one of them.

A constraint should specify whether it is checked at action time, or deferred, or deferrable (the default).
Deferrable constraints should be specified as deferred at transaction start time, by constraint name, or in general.

Transaction start should be an explicit step in a program, just like commit or rollback. If the language permits
implicit transaction start, this should be avoided in programs as a matter of programming style.

Implicit transaction start in interactive SQL is ok, as long as you keep interactive SQL out of the wrong hands.

IMO, of course. Received on Thu Sep 09 2004 - 08:45:11 CEST

Original text of this message