Re: a union is always a join!

From: Brian Selzer <>
Date: Mon, 16 Mar 2009 23:48:24 -0400
Message-ID: <c4Fvl.26433$>

"Walter Mitty" <> wrote in message news:iVsvl.538$
> "Brian Selzer" <> wrote in message
> news:pi_rl.24249$
>> My point has little if anything at all to do with transactions and
>> concurrency control. Those belong to implementations. My point is that
>> relational calculus, or any equivalent mechanism such as relational
>> algebra, while necessary for describing database updates, is not
>> sufficient for that purpose because it can only apply to a single
>> database, not two successive databases. The mechanism of updating the
>> database cannot be reduced to mere algebraic expressions, but instead to
>> asserting, in the context of what has been the case, just what in the
>> world is different and exactly how. Let me explain.
> I finally figured out that this is where the discussion branched off into
> what some of us consider mysticism.
> I disagree with the last sentence. In particular, the phrase "just what
> in
> the world is different" implies, if I read it correctly, that a database
> update has to be mapped into a "real world update". However, this mapping
> is not presupposed by either the relational calculus or the relational
> algebra. A database update is simply the difference between the ex ante
> state of the database and the ex post state of the database. It is not an
> assertion about what in the world is different, except in the eye of the
> beholder.
> The mathematics of relational calculus and relational algebra are fully
> capable, AFAIK, of describing the difference between two states of a
> database.

As an exercise, try to write a set-based update trigger (a statement trigger in Oracle) on a table with only a composite natural key. You'll find that when a column in the key may be the target of an update, that you can't just join deleted to inserted (old to new in Oracle) to determine exactly what is different. (That's one of the main reasons Oracle and many other implementations support row triggers.) Received on Tue Mar 17 2009 - 04:48:24 CET

Original text of this message