Database Reference
In-Depth Information
Attention has been focused on updates through select-project-join views since
they represent a common form of a view that can be easily reasoned about using key
and foreign key information.
There are several choices of techniques that could be used to translate from up-
dates on relational views to updates on the underlying relational database. Some
consider a translation to be correct if it does not affect any part of the database that
is outside of the view [ 5 , 22 ]. Others consider a translation to be correct as long as
it corresponds exactly to the specified update, and does not affect anything else in
the view [ 14 ]( side-effect free relational view update).
The users specify an update Upd which may be an insertion or deletion (update
is a combination of both of them) on the view instance
q B i ( x i )
B of an instance-
, where the R-algebra α is an mapping-
interpretation (obtained from a given Tarski's interpretation by Definition 11 ) that
is a model of
α (
database B
=
B
) of a database schema
B
B
. The goal is to find an update
W
on the base relational tables
that results in a new instance-database B =
α 1 (
of the underlying database
B
B
)
(where α 1
is a new mapping-interpretation which is a new model of
B
), with a view
B that implements the view update.
The update is said to be implemented without side-effects (i.e., side-effect free)
in the view if Upd(
q B i ( x i )
B , that is, no other view tuple should
be affected by the base tables modification apart from the one specified in the view
update command, and no additional tuple should appear in the view after the base
tables have been modified.
Generally, we have the following cases for the side-effect free updates:
q B i ( x i )
B )
=
q B i ( x i )
Insertions . An insertion over a nested relational algebra (NRA) view is a side-
effect free when the corresponding relational view of a query q B i ( x i ) is a select-
project-join view, the primary and foreign keys of the source relations of q B i ( x i )
are in the view and the joins are made only through foreign keys.
Deletions . Deletions over an NRA view of a query q B i ( x i ) are side-effect free
when q B i ( x i ) is well-nested. By well-nested we mean that the source relations in
q B i ( x i ) must be nested according to key-foreign key constraints in the underlying
relations.
The algorithms for the side-effect free updates through views can be found in [ 20 ],
for example.
Unfortunately, existing literature on updates through views has shown that for
many common cases there may be no side-effect free translation [ 14 , 20 , 37 ].
This led researchers to permit side-effects, to develop algorithms to detect them
[ 33 ], or to restrict the kind of updates that can be performed on a view [ 20 ].
If we cannot find a unique exact update (i.e., side-effect free) to underlying
database instance B
α (
) , an alternative is to find a minimal update to B that
will cause the specified update to the view V of a query q B i ( x i ) .
In [ 8 ], two ways of measuring minimality have been considered: the first is by
the number of changes in the tables in B ; the second is by the number of side effects
that changes in B cause in the view of the query q B i ( x i ) (in addition to the required
update).
In what follows, for our needs we will consider the second kind of the minimality
for the side-effects.
=
B
Search WWH ::




Custom Search