DBMS
DBMS
a. External level
b. Conceptual level
c. Internal level
Each user uses a language to carry out database operations. The application
programmer uses either a conventional third-generation language, such as
COBOL or C, or a fourth-generation language specific to the DBMS, such as
visual FoxPro or MS Access.
The end user uses a query language to access data from the database. A
query language is a combination of three subordinate language :
Data Definition Language (DDL)♣
Data Manipulation Language (DML)♣
Data Control Language (DCL)♣
The data definition language defines and declares the database object, while
the data manipulation language performs operations on these objects. The
data control language is used to control the user’s access to database
objects.
External
Cout << “Emp#” << Employee_Code;
Cout << “Dept#” << DepartmentEmployee_Code;
Cout << “Salary#” << Salary;
Conceptual
Employee
Employee_Code Character 6
Department_Code Character 4
Salary Numeric 5
Internal
Stored Employee Length=18
Prefix Type=Byte(6), offset=0
Emp# type=byte(6), offset=6, index empx
Dept# type=byte(6), offset=12,
Salary type=byte(6), offset=6
Mappings
Mapping determines the correspondence between one level an another.
There are two levels of mapping involved in this architecture. One is
between the external and the conceptual levels, while the other is between
the conceptual and the internal levels. The external-conceptual mapping
determines the correspondence between the conceptual anad the user
views. This specifies how a user views the conceptual data. The conceptual-
internal mapping determines the correspondence between the conceptual
and internal views. It specifies how the conceptual data is stored.
The first step in designing a databse is to define the conceptual level. The
conceptual level is then mapped to the external level. Each user view and
the requirement is taken into consideration. Next, the conceptual-internal
mapping is done. The way data is stored is derived from the conceptual
level. Ths three-level architecture of a DBMS helps achieve data
independence.