Re: is pivoted phones view updateable?

From: Aloha Kakuikanu <aloha.kakuikanu_at_yahoo.com>
Date: 13 Nov 2006 09:30:24 -0800
Message-ID: <1163439024.641672.37650_at_h54g2000cwb.googlegroups.com>


NENASHI, Tegiri wrote:
> Aloha Kakuikanu wrote:
> > Tchuzhie Giri wrote:
> > > It is not "OK" so long as one does not have your rules of updatability.
> > > You put a pile of symbols on the pile of symbols: it does not have
> > > sense without the rules. Please provide the rules, simple examples
> > > and then one can go to more complex examples.
> >
> > Given two relation variables
> >
> > Y(n, #) -- aka WorkPhones(name, number)
> > and
> > Z(n, #) -- aka CellPhones(name, number)
> >
> > and two relation constants
> >
> > A = {(t='work')}
> >
> > and
> >
> > B = {(t='cell')}
> >
> > is the view
> >
> > X = (Y /\ A) \/ (Z /\ B) -- aka ConsolidatedPhones
> >
> > updateable? There is no minus operator involved. The only two RA
> > operators are join /\ and union \/.
>
> I do not have an idea -- you did not give the rules of your dialect to
> deduce if the updation is possible. But one can deduce of your oblique
> talk that you utilize the rules of C.J. Date for the update of the
> union. If it is true then the insert updatability depends of the value
> of 't'. C.J. Date critiques his rule for this dependency but does not
> see a good choice.

This view can be inverted, therefore it's updateable. Here is how to formally invert it.

Join each side with A:

X /\ A = A /\ [ (Y /\ A) \/ (Z /\ B) ]

(different kind of brackets are used only to make the expression more readable).

Apply Spight distributivity criteria to the right side:

X /\ A = (Y /\ A) \/ (Z /\ A /\ B)

Union each side with (Z /\ 00):

(Z /\ 00) \/ (X /\ A) = [(Y /\ A) \/ (Z /\ A /\ B)] \/ (Z /\ 00)

Here we temporarily stuck, as we can no longer simplify the equation without leveraging some additional algebraic information, such as noticing that A and B have the same attributes, likewise Y and Z. Formally:

A /\ B = A /\ 00 = B /\ 00
Y /\ Z = Y /\ 00 = Z /\ 00

Therefore we have:

Z /\ A /\ B = Z /\ A /\ 00 = Z /\ 00 /\ A = Y /\ 00 /\ A

and the equality can be rewritten as

(Z /\ 00) \/ (X /\ A) = (Y /\ A) \/ (Y /\ 00 /\ A) \/ (Y /\ 00)

Since Y /\ 00 /\ A > Y /\ 00 we have

(Z /\ 00) \/ (X /\ A) = (Y /\ A) \/ (Y /\ 00)

Spight distributivity again:

(Z /\ 00) \/ (X /\ A) = Y /\ (A \/ 00)

A is not empty, therefore

(Z /\ 00) \/ (X /\ A) = Y /\ (01)

And finally:

(Z /\ 00) \/ (X /\ A) = Y

which is meant to be written as

Y = (X /\ A) \/ (Z /\ 00)

Now, it seems like we didn't accomplish our goal of inverting the original equation, as Y formally depends on Z. This is a non issue, however: joining Z /\ 00 produces the empty relation with the same attributes as Z. It is simply that we need an extra symbol for such a relation, which would add confusion. In classic RA what we have is join and projection.

Next the equation for Z can be derived symmetrically:

Z = (X /\ B) \/ (Y /\ 00)

Therefore, we have 2 views, Y and Z expressed in terms of X. How do we change Y and Z when X in updated? That is view maintenance problem! Received on Mon Nov 13 2006 - 18:30:24 CET

Original text of this message