Information Technology Reference
In-Depth Information
another avenue to be followed so as to complete the transaction. In fact, with partial
rollbacks, every transaction can be programmed to terminate with a commit request
and never with a rollback request (i.e., total rollback). The effect of a total rollback
can be achieved by setting a savepoint before the first update and then, at the end,
by performing a partial rollback to that savepoint and committing the transaction.
1.10
Multiple Granularity
We may extend our key-range transaction model by adding multiple granularity ,so
that tuples can be grouped into relations. The relations of the database constitute a
set that is totally ordered according to their identifiers. We denote this set by
f .r 1 ;R 1 /;:::;.r n i ;R n i / g ,
where r i is an identifier that uniquely identifies a relation in the database and R i is
the relation schema (= X i V i ). Tuple .x; v / in relation r is then uniquely identified
by the pair .r; x/.
The tuple-wise forward-rolling actions in the transaction model are now:
1. RŒr; x; z ; v : reading of the first tuple .x; v / with x z from relation r .
2. RŒr; x; > z ; v : reading of tuple .x; v / next to z from relation r .
3. WŒr;x; u ; v : update of tuple .x; u / in relation r .
4. IŒr;x; v : insertion of tuple .x; v / into relation r .
5. DŒr; x; v : deletion of tuple .x; v / from relation r .
New actions include:
(a) RŒr 0 ;r;R 0 : browsing the schema R 0 of relation r 0 .
(b) IŒr;R: creation of a new relation r.R/ into the database, corresponding to the
SQL statement create table r.R/.
(c) DŒr; R: deletion of an empty relation r from the database, corresponding to the
SQL statement drop table r for an empty relation r .
Additional levels could be added to the granule hierarchy by grouping relations
into databases (for different owners); new actions would then include ones corre-
sponding to the SQL statements create database and destroy database .
Problems
1.1 The personnel database of an enterprise contains, among others, the relations
created by the following SQL statements:
create table employee ( empnr integer not null ,
name varchar(40) not null , address varchar(80) not null ,
Search WWH ::




Custom Search