Database Reference
In-Depth Information
The major data definition functions (DDL—Data Definition Language) are:
CREATE TABLE
CREATE VIEW
CREATE INDEX
DROP TABLE
DROP VIEW
DROP INDEX
A general purpose programming language
L P can access the database by means of
embedded statements of
T RE X . This embedded
T RE X represents a “loose coupling”
between
T RE X and the host language
L P .
T RE X , like 'SELECT...' statements of SQL, requires a special
treatment because it causes a table to be retrieved—a table that, in general, contains
multiple records—and programming languages
A statement in
L P usually are not equipped to han-
dle more than one record at a time. It is therefore necessary to provide some kind of
a bridge between the set-at-a-time (set of tuples (or “records”) in
t
# for a state-
ment (a term) t
L P . Hence,
the cursors provide such a bridge: a cursor consists essentially of a kind of pointer
that can be used to run through a set of records, pointing to each of the records in
the set in turn and thus providing addressability to those records at a time. When a
program (a formula of
T RE X ) level of
T RE X and the record-at-a-time level of
L P ) updates the database in some way, this update should
initially be regarded as tentative only—tentative in the sense that, if something sub-
sequently goes wrong, the update may be undone (either by the program itself or
by the system). For example, if the program encounters an unexpected error, say an
overflow condition, and terminates abnormally, then the system will automatically
undo all such tentative updates on the program's behalf. Updates remain tentative
until one of two things happens:
1. Either a COMMIT statement of
L P is executed, which makes all tentative up-
dates firm (“committed”), or
2. A ROLLBACK statement of
L P is executed, which undoes all tentative updates.
Once committed, an update is guaranteed never to be undone. These problems of
recovery in database system are tightly bonded with the notion of transaction pro-
cessing .
Usually a definition of a general purpose programming language
L P is given as
a set of all programs (well defined formulas of
L P ) expressed by this language. In
the literature, a general definition is provided for a computation machine, programs
and computation systems (execution of a program P on machine M )[ 1 ]. However,
such definitions are limited for input features in the sense that the input of data is
considered only at the initial state of a program execution. Let us now introduce
more general definitions for these concepts, considering that input of data can be
distributed in different parts of a program. We denote these “input-extended” ma-
chines that are able to compute such more complex programs by MI .
Definition 35
A input-extended computation machine MI is a 5-tuple
MI
= (S M , Oper, Te s t, In M , In E , Out M ),
Search WWH ::




Custom Search