Re: Constraints and Functional Dependencies

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Sun, 25 Feb 2007 06:37:51 GMT
Message-ID: <39aEh.1042$PV3.14396_at_ursa-nb00s0.nbnet.nb.ca>


Marshall wrote:
> On Feb 24, 1:29 pm, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
>

>>UPDATE, INSERT and DELETE are all simply short-hands for popular
>>assignment statements with hooks for statement-specific triggered
>>procedures. UPDATE is logically equivalent to DELETE/INSERT (generally
>>without triggering delete or insert triggered procedures but a different
>>triggered procedure instead.)

>
>
> I've always been uncomfortable with the use of the word "short hand"
> in this context. Admittedly I can't point to a formal definition of
> the
> term, but nonetheless it seems to me to connote that the mutative
> operators will have not only the same semantics as the associated
> assignment would, but actually expand into exactly that, and thus
> have the same operational characteristics. Which I think would suck.

Not if one assumes physical independence. Not having physical independence sucks.

> So I think it's important to be clear that we mean that the two
> have the same semantics, but not necessarily the same operational
> characteristics.

I consider that a given.

Which I think is what *you* have in mind when you
> say that; I think "shorthand" is your shorthand for "same semantics
> but not necessarily anything else." (Correct me if wrong.) But I'm
> not sure everyone will come across with the same idea.

Someone will always find a pathological case where the optimizer will not work to its full potential for a general assignment; however, as much as possible, I prefer the shorthand be a shorthand.

>>One wonders what a general assignment statement should
>>trigger--especially assignments with logically equivalent results.

>
> Yeah, that's a nasty question. Essentially you have to re-verify
> every constraint from scratch. And transition constraints are
> out the window, if I understand correctly, because there is
> no unique way to assign correspondence between elements
> of the old and new value.

Sure there is: One has the old value of the relvar and the new value of the relvar. ;) What other correspondence would one want?

> (Not that I am particularly attached to transition constraints;
> notice my FOL constraint system doesn't support them.)
>
> Certainly assignment is the fundamental imperative operation;
> it can do anything. However, the same is true for the pair
> (insert, delete.) Admittedly that pair is not minimal, but
> nonetheless I am leaning in the direction of favoring support
> for insert and delete, and not for unrestrained assignment.
> Even if you have assignment, you still want insert and delete
> because they have cleaner, more transparent operational
> characteristics. (That is, it is easy to reason about their
> performance.) If we accept that we want insert and delete,
> then assignment becomes redundant. I do not expect that
> everyone will agree with my reasoning.
>
>
> Marshall
>
Received on Sun Feb 25 2007 - 07:37:51 CET

Original text of this message