Re: View updating in practice?

From: Jens Lechtenbörger <>
Date: 13 Nov 2002 11:41:05 +0100
Message-ID: <>

"Mikito Harakiri" <> writes:

> "Jens Lechtenbörger" <> wrote in message
> > Just to clarify the connection between view inverses and
> > constant complement translators, here is a rough outline of my
> > approach:
> Let's doublecheck that I understand your approach. I'm going to
> use a very restricted set of views -- Linear Algebra
> Transformations only. (Then, we need numbers domain with
> operators, of course). I will interpret your posting sentence by
> sentence in Linear Algebra.

I'll try to follow you ;)

I'm thinking about this application for the first time now...

> > Any set V of views over some data sources D usually preserves
> > some but not all of the information contained in D.
> Linear Transformation T:D->V defined by a matrix
> | 1 2 3 |
> | 2 1 0 |
> could be defined as a single view
> select x+2*y+3*z, 2*x+y from D
> or an equivalent set of views
> select x+2*y+3*z from D
> select 2*x+y+0*z from D

This is not equivalent. You loose the connection between pairs of coordinates in your vector space.

Moreover, I guess that in "select x+2*y+3*z, 2*x+y from D" you might want to talk about a 2-dim subspace of a 3-dim space, thus

        select x+2*y+3*z, 2*x+y, 0 from D

might be preferable.

> Linear transformation in general could map a set of linear
> independent vectors into a set of linear independent
> vectors. Then, it preserves all the "information" contained in
> that linear set. Otherwise, it preserves information
> "partially". In my example, linear independent set of vectors
> {<x=1, y=0, z=0>,<x=0, y=1, z=0>} map into linear independent set
> {<1,2>,<2,1>}. If we add one more linear independent vector, say,
> <x=0, y=0, z=1>, then the result {<1,2>,<2,1>,<3,0>} is no longer
> linear independent.

I can follow you.

> > Now, a set C of views over D is a complement of V if it is
> > possible to compute D from V and C, i.e., if there is way to
> > compute any source state from the state of V and C,
> If we add one more row to the matrix in our example
> | 1 2 3 |
> | 2 1 0 |
> | 1 1 -1 |
> then it becomes invertible. Invertible transformation T maps
> vectors one-to-one. In view interpretation additional matrix
> row(s) is a complement view
> select x+y-z from D

This is not a complement. Again you loose the connection between coordinates. The complement should probably be expressed as a subspace in a 3-dim space. See below for a simpler example.

> > Note that in general, complements are not unique (as you might
> > expect from algebraic complements).
> Nonuniquness is obvious in the Linear Algebra interpretation:
> There many ways to complement a transformation to the invertible
> one. For example we could use
> select x+y-2*z from D
> as an alternative complement view.

Apart from the fact that this is not a complement, I see the analogy.

> Note that your aside comment is not valid: complements are linear
> equations, not elements of the algebra domain.

What was my aside comment?
(In fact, I meant "Boolean" when I wrote "algebraic". I'm sorry for the confusion.)

> > In particular, views that describe a copy of D are a complement
> > for any set of views.
> View defined as a "Copy of D" is just a view based upon identity
> matrix:
> select x, y, z from D


> > Now, a view update on view V can be translated under constant
> > complement if there is a complement C of V such that the
> > contents of C do not change when the view update is executed on
> > the database.
> Here I'm lost.
> Suppose, D current content is {<x=1,y=1,z=1>}. A view V would
> manifest <1*1+2*1+3*1,2*1+1*1>=<6,3>. Suppose a new tuple
> <x=2,y=2,z=2> added. A view V would manifest an extra tuple
> <1*2+2*2+3*2,2*2+1*2>=<12,6>. Is there a view D such that an image
> of the new and the old tuple is the same? It certainly is, for
> example
> select x-z from D
> It would depend on the new tuple and the D currrent content, of
> course.

I'm not sure what you are looking for in the above paragraph.

Consider a simpler scenario, a 2-dim space, i.e. R(x,y):

       V = select x, 0 from R

What is a complement?
Note that it's not:

       C = select 0, y from R

(Both views together cannot distinguish the instances

  r1 = { <0,0>, <1,1> } and r2 = { <1,0>, <0,1> },

since we have

V(r1) = { <0,0>, <1,0> } = V(r2) and

C(r1) = { <0,0>, <0,1> } = C(r2). )

In fact, there is no "natural" complement for a projection view that does not include the key of the underlying relation (as in the above example). For details, please see the paper "On the Computation of Relational View Complements", which you can download at:

> Constant complement, however, seems meaningless from linear
> algebra perspective:

I agree.

> neither user, nor the systems calculates complement view.
> Given a view update, one needs to translate it
> back to the base relations. I don't see how can it be done without
> solving equations. And a view have to be invertible.
> Or maybe I'm just missing correct Linear Algebra interpretation of
> the constant complement?

I don't know if there is one.

Sorry to disappoint you,

Jens Received on Wed Nov 13 2002 - 11:41:05 CET

Original text of this message