Re: View updating in practice?

From: Jens Lechtenbörger <lechtej_at_uni-muenster.de>
Date: 09 Nov 2002 23:43:46 +0100
Message-ID: <m265v6nz31.fsf_at_pcwi1068.uni-muenster.de>


mikharakiri_at_yahoo.com (Mikito Harakiri) writes:

> "Jens Lechtenbörger <lechtej_at_uni-muenster.de> wrote in message news:<m2of9087s0.fsf@pcwi1068.uni-muenster.de>...
> > 3. Does anybody use SQL:1999 INSTEAD triggers to implement view
> > updates?
>
> Checkout "inverse view" thread on comp.databses.theory:
>
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=PL%25K6.2267%24j65.183466%40www.newsranger.com&rnum=1&prev=/groups%3Fas_q%3Dinverse%2520view%26safe%3Dimages%26ie%3DISO-8859-1%26as_ugroup%3Dcomp.databases.theory%26lr%3D%26as_drrb%3Db%26as_mind%3D12%26as_minm%3D5%26as_miny%3D1981%26as_maxd%3D28%26as_maxm%3D12%26as_maxy%3D2002%26hl%3Den
>
> The original poster shows that if 'view inverse' is known, then
> writing INSTEAD OF trigger is essentially a mechaical task.
>
> BTW, it looks like the poster rediscovered 'view inverse' and the idea
> of missing information -- 'view complement' -- without knowing about
> Bancilhon&Spyratos Paper.

Just to clarify the connection between view inverses and constant complement translators, here is a rough outline of my approach: Any set V of views over some data sources D usually preserves some but not all of the information contained in D. 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, or, in other words, if V and C are equivalent to D (equivalent with respect to information content), or, again in other words, if there is a view inverse for V and C. Note that in general, complements are not unique (as you might expect from algebraic complements). In particular, views that describe a copy of D are a complement for any set of views.

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. The intuition why such view updates are desirable is the following: Assume that there is a view update that cannot be translated under constant complement. Then such a view update must have effects that are not visible in V. Without any precautions, those effects will be visible in external schemata of different users. Please think about it.

What I have shown is the following: Users might be able to undo their view updates using further view updates if and only if their view updates can be translated under constant complement. (The "might" indicates that users are able to undo their view updates at least in theory; in practice, the update language might not be expressive enough, though.)

Informally, translation under constant complement implies that all effects of view updates are visible in the views. Hence, users are in full control of their actions. Stated differently, users can undo their view updates if and only if they know what they are doing.

Concerning the relationship to an approach based on view inverses: If the view itself is equivalent to some base relation(s) then there is no need for a complement. Hence, even the empty set of views is a complement. Clearly, the empty complement remains constant under any update. Consequently, such an approach is a very special and restricted case of the constant complement approach.

> Thank you for the posting, Jan: quality contributions to this group
> are not that common:-( I'm also enjoying yours "On Computation of
> Relational View Complements".

Jan (Hidders)? Jens?
Anyway, you're welcome ;)

> As far as your unpublished paper, next
> time don't call it "... considered harmful" -- the CS community
> allowed only one paper with such a title:-)

Thanks for that hint,

Jens Received on Sat Nov 09 2002 - 23:43:46 CET

Original text of this message