Database Reference
In-Depth Information
2. A quadruple (i,t,j,k) where i is its address, t
Te s t , j is the address of the next
instruction when t returns with 1, while k is the address of the next instruction
when t returns with 0;
3. The initial instruction of a program has the address 0. Every next address, which
appears in a program P, such that it is not an address of some instruction in P, is
an address of the final state of P.
Intuitively, the semantics of a program P can be described in the following way:
A machine begins to execute the first instruction of a program, with address equal
to 0, and after that calls the next instruction. It is possible to have one of the two
following cases:
Called instruction is (i,f,j) . The machine executes the operation f and passes
from the current state st
S M into the resulting state st . After that it calls the
next, j th instruction (if this instruction does not exist then the end of computation
is reached).
S M executes
the test t and after that calls the next instruction— j if t returns 1, k otherwise (if
this instruction does not exist then the end of computation is reached).
The most powerful Σ RE algebra, with its operations introduced by Definition 31 and
the set of terms
Called instruction is (i,t,j,k) . The machine with a current state st
X (i.e., relational symbols), can be used as
a database-sublanguage in general programming languages, to manipulate the data
in relational form.
The same language
T RE X with variables r
T RE X can be available at two different interfaces, namely
an interactive interface and an application programming interface. Therefore,
T RE X
is both an interactive query language and a database programming language (like
SQL). That is, any
T RE X statement that can be entered at a terminal can alternatively
be embedded in a program (in some general purpose programming language
L P ,
where
L P ).
The first point to be made is that there will normally be many users, of both kinds,
all operating on the same data at the same time. Relational DataBase Management
System (RDBMS) will automatically apply the necessary controls (basically lock-
ing) to ensure that those users are protected from one another, i.e., RDBMS will
guarantee that one user's updates cannot cause another user's operations to produce
an incorrect result. It is generally an objective of multi-user systems to allow indi-
vidual users to behave as if the system were single-user instead. Note that tables,
like users, also come in two kinds, namely base tables and views:
T RE X
A base table is a “real” table, i.e., a relational table ( n -ary relation R
Υ ) that
physically exists, in the sense that there exist physically stored records, and also
physical indexes, that directly represent that table in storage as an extension R
=
r
of a given relational symbol r of a database schema.
By contrast, a view is a “virtual” table, i.e., a table that does not directly exist
in physical storage, but looks to the user as if it did. Formally, a view is a term
t
T P X
T RE X of the SPJRU subalgebra Σ R
Σ RE in Definition 31 , different
from a variable r
X (i.e., a relational symbol of a database schema), whose
extension R
# is a “virtual” table. Views can be thought of as different
ways of looking at the “real” tables: it is derived from one or more underlying
base tables.
=
t
Search WWH ::




Custom Search