Re: Guessing?

From: Brian Selzer <>
Date: Sun, 25 May 2008 21:43:12 -0400
Message-ID: <RAo_j.2439$>

"paul c" <toledobysea_at_ac.ooyah> wrote in message news:xuk_j.165843$Cj7.9496_at_pd7urf2no...
> Brian Selzer wrote:
> ...
>> Well, that's just it. It has no consistent method for doing so. ...
> It does, I gave one, ie., apply, ie., distribute algebraically, the union
> to the base relations in the view expression, then apply whatever
> constraints the definition has. Works just as consistently for deletes to
> joins.

And then since the insert doesn't violate any constraints on the base relations, two rows would be inserted, one in each base relation, but these don't show up in the view because the view is a disjoint union. Now, if you were to allow the insert, wouldn't that violate the assignment principle?

> If it just
>> guesses at the intent, 50% of the time it will guess wrong, and you'll
>> end up with garbage in the database. As a consequence, queries like,
>> "How many suppliers are west of the Mississippi?" will return the wrong
>> answer.
>> ...
> My whole point is that the dbms has no business guessing, just following
> orders. Why anybody would imagine a dumb pre-programmed logical machine
> can know human intentions can only be pathological mysticism. As they
> say, "don't believe everything you think".

I agree with you that the dbms has no business guessing, but if you order the dbms to do the impossible, you have to expect it to complain.

>> But again, it should not allow the update if it has to guess, because
>> inevitably, it will guess wrong at least some of the time and the
>> database will end up corrupt. That it has to guess is not a guess.
>> ...
> It is mysticism to think that a dbms that follows its own consistent rules
> is somehow guessing.

Well, that's just the point I was trying to make. If you're not specific enough, you're asking the dbms to pick one of many possible courses of action. While the dbms should be able to determine whether a course of action is possible, it should not be asked to choose between possible courses of action, and it should complain equally as loud since neither should be possible.

The bottom line: manipulative operations should be deterministic. If there is more than one possible set of updates to the underlying relations that yields the same value for a view, then updates to such a view should be prohibited. Received on Mon May 26 2008 - 03:43:12 CEST

Original text of this message