Database System Architecture: The Three Level of The Architecture
Database System Architecture: The Three Level of The Architecture
CHAPTER II
External level
(individual views)
Conceptual level
(community user view)
Internal level
(Storage view)
External(PL/I) External(PL/I)
DCL 1. EMPP, 01 EMPC.
2. EMP# CHAR (6), 02 EMPNO PIC X(6).
3. SAL FIXED BIN (31); 02 DEPTNO PIC X(4).
Conceptual
EMPLOYEE
EMPLOYEE_NUMBER CHARACTER (6)
DEPARTMENT_NUMBER CHARCTER (4)
SALARY NUMERIC (5)
Internal
STORED_EMP BYTES = 20
PREFIX TYPE = BYTE (6) , OFFSET = 0
EMP# TYPE = BYTE (6) , OFFSET = 6 , INDEX = EMPX
DEPT# TYPE = BYTE (4) , OFFSET = 12
PAY TYPE = FULLWORD , OFFSET = 16
At the conceptual level, the database contains information concerning an entity type
called EMPLOYEE.
At the internal level, employees are represented by a stored record type called STORED-
EMP, twenty bytes long.
The PL/I user has an external view of the database in which each employee is represented
by a PL/I record containing two fields. The record type is defined by an ordinary OPL/I
structure declaration I n accordance with the normal PL/I rules.
Similarly, the COBOL user has an external view in which each employee is represented
by a COBOL record containing, again, two fields. The record type is defined by an
ordinary COBOL record description in accordance with the normal COBOL rules.
Notice that corresponding data items can have different names at different points.
For example, the employee number is called EMP# in the PL/I external view, EMPNO in
the COBOL external view, EMPLOYEE_ NUMBER in the conceptual view, and EMP#
again in the internal view.
The system must be aware of the correspondences.
3
For example, it must be told that the COBOL field EMPNO is derived from the
conceptual field EMPLOYEE_ NUMBER, which in turn is derived from the
stored field EMP# at the internal level.
Host language Host language Host language Host language Host language
+DSL +DSL +DSL +DSL +DSL
External/conceptual External/conceptual
mapping A mapping B
Schemas and
Database
mapping built and management
maintained by the Conceptual Conceptual view system (DBMS)
schema
database
administrator
(DBA)
Conceptual/ Internal
mapping
Storage structure
definition Stored database (internal view)
(Internal schema)
*User Interface
MAPPINGS
The detailed system architecture involves certain mappings – one conceptual/
internal mapping and several external/ conceptual mappings.
The conceptual/ internal mapping defines the correspondence between the
conceptual view and the stored database. If the structure of the stored database is
changed, then the conceptual/internal mapping must be changed according by, so
that the conceptual schema can remain invariant.
An external / conceptual mapping defines the correspondence between a
particular external view and conceptual view. Any number of external views can
exist at the same tim; any number of users can share a given external view;
different external views can overlap.
The conceptual/internal mapping is the key to physical data independence.
The external/conceptual mappings are the key to logical data independence.
Query
DDL DML Language
Processors Processors Processors
Compiled
requests
enforce security
Source and object and integrity
schemas and constraints
Optimizer
mapping
Optimized
requests
database
data
CLIENT/SERVER ARCHITECTURE
A Database system can be regarded as having a very simple two-part structure, consisting
of a server (also called the backend) and a set of clients (also called fronted)
End user
Applications Clients
Applications Server
Database
The server is just the DBMS itself. It supports all of the basic DBMS functions. Thus,
“server” in this context is just another name for the DBMS.
The clients are the various applications that run on top of the DBMS- both user –written
applications and built-in applications i.e., applications provided by the DBMS vendor or
by some third party.
UTILITIES
Utilities are programs designed to help the DBA with various administration tasks.
Some examples of the kind of utilities are:
Load routines to create the initial version of the database from one or more
operating system files;
Unload/ reload routines, to unload the database, or portions thereof, to backup
storage an to reload data from such backup copies;
Reorganization routines, to rearrange the data in the stored database for various
reasons;
Statistical routines, to compute various performance statistics such as file sizes or
value distributions or I/O counts , etc;
Analysis routines , to analyze the statistics just mentioned; and so on.
11