Database Reference
In-Depth Information
with SQL statements
,
each atomic transaction of this program P will result in a mor-
phism in the
DB
category
,
between the models
(
i
.
e
.,
consistent database instances
)
of a schema
,
before and after such an atomic transaction
.
This morphism is the result of a specific schema mapping from
A
,
thus it is
representable by a categorial semantics of a database mapping system in Sect
.
4.1.2
.
A
into
A
Notice that this corollary is valid not only for all SQL program transactions (the
data manipulation language DML), but also for the DDL functions, as CREATE
TABLE and DROP TABLE, which change database schemas as well. Consequently,
the whole story of changes of a given database, in the concurrent-programs frame-
work, my be represented by the schema mappings, and their functorial denotational
semantics based on the
DB
category (in Sect.
4.1.2
).
6.4
Review Questions
1. Definition
35
provides an input-extended abstract computation machine
MI
by
introducing the (partial) input function
In
E
. Why is it important for the programs
with embedded
Σ
RE
algebra terms, used as a database-sublanguage in order to be
able to manipulate the data in a relational form and update an instance database?
Why have we extended this (partial) input function into the total function
In
∗
E
,
from an algebraic point of view for computation machines and/or from the point
of view of Computation Systems?
2. Why are we using the class of
μ
-recursive functions defined inductively by
Kleene for the “universal machines”? What is your explanation for why we pre-
ferred a class of the input-extended Register machines
RMI
in Definition
38
(for
which we needed to demonstrate that it is a universal machine as well), instead of
the well known (in the theory of computations) Turing machines? An exercise:
If you chose alternatively the Turing machines, show that the rest of the results
in this chapter will be preserved as well.
3. In the rest of this chapter, we separated the universal machine
M
U
, able to exe-
cute any computation program, from the Categorial Database Machine
M
R
ded-
icated to maintaining and updating the database instances. What is exactly the
computation power of this DB machine (see the last section of the previous chap-
ter)? Can you define a less powerful abstract categorial DB machine for the only
Codd's SPJRU algebra and the corresponding subcategory of the
DB
category
(consider only the first row of the Table
6.1
after Fig.
6.1
of the proposed rela-
tional DBMS)?
4. The Bind component in Fig.
6.1
produces an application plan, by transforming
the original
Σ
RE
terms into the morphisms of the
RA
category, and by substitut-
ing the original algebra operators used in the previous chapter with the variable-
binding operators. Why is it necessary? Provide an example and explain how it
works, for example, for the term
t
R
which was used in Examples
28
and
33
.
5. Why is the Categorial RDB machine in Definition
40
able to provide any kind of
updating of a given instance database? Can it be used for the concurrent database
updating from a number of concurrent programs and, if not, what else do we