0% found this document useful (0 votes)
52 views7 pages

Data Abstraction

Data abstraction

Uploaded by

michaelnganga678
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views7 pages

Data Abstraction

Data abstraction

Uploaded by

michaelnganga678
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

DATA ABSTRACTION IN DBMS/VIEWS OF DATA

Database systems are made-up of complex data structures. To ease the user interaction with database,
the developers hide internal irrelevant details from users. This process of hiding irrelevant details
from user is called data abstraction.

We have three levels of abstraction (view level, logical level and physical level)-The three level
architecture
DBMS – Three Level Architecture(Views)

Objective of the Three Level Architecture


1. Each user should be able to access the same data, but have a different customized view of
the data.
2. Each user should be able to change the way he or she views the data, and this change should
not affect other users.
3. Users should not have to deal directly with physical database storage details, such as
indexing or hashing. In other words, a user's interaction with the database should be
independent of storage considerations.
4. The Database Administrator (DBA) should be able to change the database storage structures
without affecting the user's views
5. The internal structure of the database should be unaffected by changes to the physical
aspects of storage, such as the changeover to a new storage device.
6. The DBA should be able to change the conceptual structure of the database without affecting
all users.

DBMS Three Level Architecture Diagram


This architecture has three levels:
1. External level
2. Conceptual level
3. Internal level

1. External level/View level

- It is the users' view of the database.


- The user doesn’t need to know the database schema details such as data structure, table
definition etc. user is only concerned about data which is what returned back to the view level
after it has been fetched from database (present at the internal level) - External level is the
“top level” of the Three Level DBMS Architecture.
- Translation from external level to conceptual level is done automatically by DBMS at run
time.
2. Conceptual level /Logical level.

- This level describes what data is stored in the database and the relationships among the
data.
- This level contains the logical structure of the entire database as seen by DBA - This
level must not contain any storage dependent details.
- Hides details of the physical(internal) level.
- Database constraints and security are also implemented in this level of architecture. This level
is maintained by DBA (database administrator).
- The DBMS maps data access between the conceptual to physical schemas automatically

For example, in case of student database Roll No, Name, Class, Address etc. are attributes of entity
student.

3. Internal level/ Physical level


This level describes how the data is actually stored in the storage devices. This is the lowest level
of the architecture.
The internal level is concerned with such things as:

• Storage space allocation for data and indices;


• Record descriptions for storage (with stored sizes for data items);
• Record placement;
• Data compression and data encryption techniques.

DATABASE SCHEMA
A database schema is the skeleton structure that represents the logical view of the entire database. It
defines how the data is organized and how the relations among them are associated.
It’s the database designers who design the schema to help programmers understand the database and
make it useful.
The process of creating a database schema is called data modelling.

A database schema can be divided broadly into three categories −


 Physical Database Schema − this schema pertains to how the data is actually stored in the
storage devices.

 Logical Database Schema- This schema describes what data is stored in the database
and the relationships among the data. It defines tables, views, and integrity constraints.

 View schema- This schema generally describes the end user interaction with the database
system.

For example: In the following diagram, we have a schema that shows the relationship between
three tables: Course, Student and Section. The diagram only shows the design of the database; it
doesn’t show the data present in those tables. Schema is only a structural view(design) of a
database as shown in the diagram below.

DATA INDEPENDENCE
It is the property of the database which tries to ensure that if we make any change in any level of
schema of the database, the schema immediately above it would require minimal or no need of
change. It removes the need for additional amount of work needed in adopting the single change
into all the levels above.
Data independence can be classified into the following two types:

1. Physical Data Independence: This means that for any change made in the physical
schema, the need to change the logical schema is minimal. This is practically easier to
achieve.

2. Logical Data Independence: This means that for any change made in the logical schema,
the need to change the external schema is minimal; this is a little difficult to achieve.
DBMS INSTANCE
Definition of instance: The data stored in database at a particular moment of time is called instance
of database.

Database schema is a representation of a planned database and does not actually contain data while
a database instance is a snapshot of an actual database at a particular time.

For example, let’s say we have a single table student in the database, today the table has 100 records,
so today the instance of the database has 100 records. Let’s say we are going to add another 100
records in this table by tomorrow so the instance of database tomorrow will have 200 records in
table. In short, at a particular moment the data stored in database is called the instance, that changes
over time when we add or delete data from the database.

CLASSIFICATION OF DATABASE SYSTEMS

1. Based on the data model


i) Relational database
ii) Hierarchical database
iii) Network database
iv) Object oriented database
v) Object relational database
2. Based on the number of users
i) Single user – As the name itself indicates it can support only one user at a time. It is
mostly used with the personal computer on which the data resides accessible to a single
person. The user may design, maintain and write the database programs.
ii) Multiple users – It supports multiple users concurrently.

3. Based on the sites over which network is distributed


i) Centralized database system – The DBMS and database are stored at the single site that
is used by several other systems too. We can simply say that data here is maintained on the
centralized server.

ii) Parallel network database system – This system has the advantage of improving
processing input and output speeds. Majorly used in the applications that have query to
larger database. It holds the multiple central processing units and data storage disks in
parallel.
iii) Distributed database system – In this data and the DBMS software are distributed over
several sites but connected to the single computer.

4. Based on the usage

i) Online transaction processing (OLTP) DBMS – They manage the operational data.
Database server must be able to process lots of simple transactions per unit of time.
Transactions are initiated in real time, in simultaneous by lots of user and applications hence
it must have high volume of short, simple queries.

ii) Online analytical processing (OLAP) DBMS – They use the operational data for tactical
and strategical decision making. They have limited users deal with huge amount of data and
complex queries.

iii) Big data and analytics DBMS – To cope with big data new database technologies have
been introduced. One such is NoSQL (not only SQL) which abandons the well-known
relational database scheme.

iv) Multimedia DBMS – Stores data such as text, images, audio, video and 3D games which
are usually stored in binary large object
SAMPLE KNEC QUESTIONS
July 2017
1. Describe two ways of classifying database management systems. (4 marks)
2. Outline three types of end users in a database environment. (3 marks)
3. Define the term data abstraction as used in database management system (2 marks)
4. Explain two reasons that may lead to the migration from file based to database centered
approach. (4 marks)
5. Outline the roles of each of the following in a database management system
environment.
(4 marks)
i) Hardware
ii) Data
6. Explain two disadvantages of database approach. (4 marks)
7. With the aid of a diagram explain two paradigms the early models of databases were
based on. (4 marks)
July 2016
1. Distinguish between active data dictionary and passive data dictionary as used in
databases.
(4 marks)
2. An organization intends to acquire a database application to manage its data. Describe
three professionals that may be required. (4 marks)
3. State two similarities between hierarchical and network database models. (4 marks)
4. Explain two reasons for one using online database. (4 marks)

You might also like