View of Data in DBMS
The major goal of a
database system is to provide user the abstract view of data, that is, the
system hides certain details of how the data is stored and accessed.
1. Data Abstraction:
To simply the user
interaction with the system, the developers hide the system complexity through
several levels of abstraction:
Physical level: This is the lowest
level of abstraction. It hides from the user how the data are
actually stored. It also describes the complex low level data structure in
detail.
Logical level: This is next
higher level of abstraction. It describes what data are stored in
database and what relationship exists among these data. It thus
describes the database in simple structure.
View level: This is the highest level of abstraction. The
system may provide many views of the same database. The view
level describes only a part of the entire database to simplify the interaction
with the user.
Figure 1: The three
levels of data abstraction
For example, in
Pascal – like language, we may declare a record as follows:
type customer = record
Customer_id : string;
Customer_name : string;
Customer_city : string;
end;
This code defines a
new record type called customer with three fields. Each field has a name and a
type associated with it. Similarly, a banking enterprise may be record as
Account, with field account_number and account_balance
At the logical
level, each record is described by a type of definition. Programmers and
database administrators usually work at this level of abstraction.
2. Instances and
Schemas
The collection of
information stored in the database at a particular time is known as instance
of the database. The overall design of the database is known as schema
of the database. Schemas are changed infrequently.
A database schema
corresponds to the declaration of variables along with the type definition in
program. The value of variables at a point in time corresponds to the instance
of the database schema.
Database systems have several schemas, separated according to the abstraction levels. The physical schema describes the design of database at the physical level, while the logical schema describes the design of database at the logical level. The database schema at the view level, also called as subschemas, describes different views of the database.
Comments
Post a Comment