Re: Guessing?
Date: Mon, 26 May 2008 02:21:48 GMT
Message-ID: <09p_j.294813$pM4.94170_at_pd7urf1no>
Brian Selzer wrote:
> "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?
> ...
It is becoming more and more apparent to me that the Assignment Principle is a case of wanting to have your cake and eat it too.
>> 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.
I say it is willful to say "should be deterministic", it sort-of sounds good but from what I know it is contradictory with other goals people like Date talk about, such as making views behave the same way as base relations. If a dbms' logic admits boolean 'or', then traditional programming notions of determinism can't be satisfied. I'll take a consistent logic over niceties any day, even if that puts me in a minority - I'm already a member of many other minorities, in fact I'm a member of more minorities than the number of majorities most people I've met who were in majorities were in, even though many of them think I'm not even in a minority! Received on Mon May 26 2008 - 04:21:48 CEST