Re: a union is always a join!

From: Brian Selzer <brian_at_selzer-software.com>
Date: Thu, 19 Mar 2009 17:34:39 -0400
Message-ID: <PTywl.24297$yr3.6707_at_nlpi068.nbdc.sbc.com>


"Kevin Kirkpatrick" <kvnkrkptrck_at_gmail.com> wrote in message news:20aa4363-4618-492f-9a38-b7b0291f03fa_at_a12g2000yqm.googlegroups.com...

<big snip>
>
> Brian,
>
> I have a major objection to your "transition-constraints".
>
> It is my understanding that databases are models of the real world,
> and database values are collections of assertions (tuples) that fit
> the database model (relations). At any given time, a database value
> may contain assertions which are factually incorrect. When this is
> detected, database users need to correct the database value by
> updating/inserting/deleting appropritate tuples. Modifying a database
> value from V1 to V2 is ONLY asserting that V1 is incorrect, and V2 is
> correct. Nothing more.
>
> Modifying a database value from V1 to V2 is NOT the same as
> 1) asserting that V1 was a fully correct description of the real world
> at some earlier time,
> 2) V2 is a correct description of the real world at present, and
> 3) that the real-world transitioned directly from state V1 to V2 (e.g.
> no other database value V3 exists such that V3 correctly described the
> real world after V1 and before V2).
>
> However (and please identify/correct the straw-man here if it is one),
> it seems like this is precisely how you think a modification of a
> database value from V1 to V2 should be interpretted.

Not exactly. (1) The universe of discourse is not nor have I even sought to imply that it is "the real world." The universe of discourse is just an abstraction that might reflect some aspect of the real world, or might be completely contrived. That said, under the Closed World Assumption, what is not stated by the database is not true, and under the Domain Closure Assumption, only those terms that appear in positive formulae denote (map to things in the universe of discourse). So under those assumptions, a database is a complete description of just a picture of the universe of discourse. In particular, during a transition, V1 is a complete description of what had since the last transition and up to now been the case /with respect to the universe of discourse./ (2) Also during a transition and in the same way that V1 is complete, V2 is a complete description of what is now the case /again with respect to the universe of discourse./ (3) V1 is what had been the case during the the half-closed interval [T1, T2), where T1 is the point in time of the last transition and T2 is the time of the present transition; V2 is what will have been the case during the half-open interval [T2, now), once the transition is complete. There is no overlap; there are no gaps; therefore, there cannot be a V3 between V1 and V2.

> I'll try to use
> your example to illuminate how absurd this is:
>
> Let us assume that we need to model the predicate "The traffic light
> at <cross_road> is <color>". I'll leave aside any attempt to find any
> use for such a predicate, but let's assume this is all the information
> our client cares to store about traffic lights at cross-roads.
>
> We model the predicate with the aformentioned TrafficLight relation.
>
> At 1:00 p.m., database user Alice asserts "The traffic light at <1st
> and Elm> is <Green>"
>
> The database receives :
>
> UPDATE TrafficLights
> SET color = 'Green'
> WHERE crossroad='1st and Elm';
>
> 5 minutes later database user Bob asserts, "The traffic light at <1st
> and Elm> is <Red>"
>
> The database receives:
>
> UPDATE TrafficLights
> SET color = 'Red'
> WHERE crossroad='1st and Elm';
>
> Nobody has asserted any proposition that fits "The traffic light at
> <crossroad> transitioned directly from <color1> to <color2>".
> Specifically, Bob is NOT asserting "The traffic light at 1st and Elm
> transitioned directly from green to red".
>
> Perhaps
> 1) the light had always been red, but Alice is color-blind and mis-
> reported it as 'Green', or
> 2) between when Alice and Bob reported its state, it was yellow (but
> nobody noticed).
> 3) the light was green or yellow when Bob saw it, but he clicked the
> wrong dropdown item and asserted 'Red'
> Since our databse does not model the real world in a way that allows
> us to infer 1, 2 or 3 (or any other plausible alternative), it cannot
> use your "transition constraints" to assume and prevent #3.
>

So what you're saying is that (1) we shouldn't specify constraints that can keep garbage out of the database because the users that supply information are unreliable witnesses; that (2) we shouldn't specify constraints that can keep garbage out of the database because the users that supply information are unreliable witnesses; and that (3) we shouldn't specify constraints that can keep garbage out of the database because the users that supply information are unreliable witnesses.

By your reasoning, there's just no point in defining /any/ constraints at all.

<snip> Received on Thu Mar 19 2009 - 22:34:39 CET

Original text of this message