DDBMS Architecture
DDBMS Architecture
Global Schema
Site
Fragmentation independent
schema schemes
Allocation
schema
DBMS of DBMS of
site 1 site 2
Local Local
database database
at site 1 at site 2
Each global relation can be split into several non overlapping portions which are called
fragments. The mapping between global relations and fragments is defined in the
fragmentation schema. This mapping is one to many i.e. one global relation has many
fragments but one fragment corresponds to one global relation only. For example R i
indicates the ith fragment of global relation R. Fragments are logical portions of global
relations which are physically located at one or several sites of the network.
The allocation schema defines at which site(s) a fragment is located. All the fragments
which correspond to the same global relation R and are located at the same site j
constitute the physical image of global relation R at site j. Here Rj indicates the physical
image of the global relation R at site j.
An example of the relationship between the object types defined above is shown in Fig.
2. A global relation R is split into four fragments R 1, R2, R3, R4. These four fragments are
allocated redundantly at the three sites of a computer network. Consequently three
physical images are made named as R1, R2, and R3. Hence R23 indicates the copy of
fragment R2 which is located at site 3.
R 11
R R 21
R1
R12
R2
R 22
R3
R4 R 23
R 33
R 43
Once again referring Fig.1 it can be said that the top three levels are site independent and
hence do not depend on the data model of the local DBMSs. At a lower level, it is
necessary to map the physical images to the objects which are manipulated by the local
DBMSs. This mapping is called a local mapping schema and depends on the type of local
DBMS. So in a heterogeneous system there may be different types of local mappings at
different sites.
This feature called as local mapping transparency allows us to study several problems
of distributed database management without having to take into account the specific data
models of local DBMSs.
Other than the said transparency there are other transparencies as well. These
transparencies such as replication transparency and location transparency etc. which will
be discussed later.
Although the process of fragmentation along with examples will be discussed during
distributed database design, the general guideline is mentioned here as a part of the
reference architecture.
Completeness condition All the data of the global relation must be mapped into the
fragments i.e. it must not happen that a data item which belongs to a global relation does
not belong to any fragment.
Let us consider a simple query called SUPENQUIRY. It accepts a supplier number from
a terminal, finds the corresponding supplier name and displays it at the terminal. The
application is written using a PASCAL-like language with embedded SQL statements for
database access.
The way in which the application accesses the database if the DDBMS provides
fragmentation transparency is shown in Fig. 3 a) and code.
SUPPLIER1 Site 1
DDBMS
SUPPLIER2 Site 2
SUPPLIER2 Site 3
SUPPLIER1 Site 1
DDBMS
or
SUPPLIER2 Site 3
DDBMS Site 1
SUPPLIER1
SUPPLIER2 Site 3
Code :
read(terminal, $SNUM);
select NAME into $NAME
from SUPPLIER1 at Site 1
where SNUM = $SNUM;
if not #FOUND then
select NAME into $NAME
from SUPPLIER2 at Site 3
where SNUM = $SNUM;
write(terminal, $NAME)