Module V (Database Management System)
Module V (Database Management System)
BBA, SEMESTER 1
COMPUTER APPLICATIONS
ARPAN SINHA
1
MODULE V
2
Data – Collection of raw facts and
figures .
Information – processed
DATA , meaningful and usable data.
3
A DBMS is a complex set of software
programs that controls the organization,
storage, management, and retrieval of data in
a database.
4
THE TRADITIONAL FILE APPROACH TO DATA
MANAGEMENT
Application
Data Files Reports
Program
5
Example: Student Data in a University.
Integrity problems
SYSTEMS
7
- Atomicity of updates
- Security problems
PURPOSE OF Hard to provide user access to
DATABASE SYSTEMS some, but not all, data
CONT…
8
Concurrent access by multiple
users
Concurrent accessed needed
for performance
Uncontrolled concurrent
accesses can lead to
inconsistencies
Example: Two people
reading a balance and
updating it at the same
time
PURPOSE OF Database systems offer solutions to all
DATABASE the above problems
SYSTEMS CONT…
9
THE DATABASE APPROACH
The Database Management System Approach
A pool of related data is shared by multiple application programs. Rather than
having separate data files, each application uses a collection of data that is either
joined or related in the database.
Checking
Reports
Programs
Database
Management
Savings
Reports System
Programs All Data
Loan DBMS
Reports Programs
10
Controlled Redundancy (Duplicate data)
Data Consistency
Data Sharing (Shared my multiple user)
Data Integrity (Accurate data in a database)
Data Abstraction
Data Independence
Data Security
Transaction Control
Concurrent Access
ABSTRACTION
12
3- Levels of Data Abstraction
13
Physical level:-
It is the lowest level of abstraction & specifies how the data is actually
stored. It describes the complex data structure in details.
Logical level:-
It is the next level of abstraction & describes what data are stored in
database & what relationship exists between various data.
View level:-
This level contains the actual data which is shown to the users. This is
the highest level of abstraction & the user of this level need not know
the actual details (complexity) of data storage.
14
Database Schema
Overall Structure of the database.
Database system has several schemas
according to the level of
abstraction.
Physical schema - Physical level.
Logical schema - Logical level.
Sub-schemas(View level) - View level.
Database Instance
SCHEMA AND The information in a database at a
INSTANCE particular point in time.
15
DATA INDEPENDENCE
The ability to modify a scheme definition in one level without
affecting a scheme definition in a higher level.
There are two kinds:
Physical Data Independence
The ability to modify the physical scheme without
causing application programs to be rewritten
Modifications at this level are usually to improve
performance
16
Logical data independence
20
Data Control Language
21
DBMS – USERS
Database Administrator
Data administration
24
The Cost of using a DBMS
Database Damage
25
DATA MODEL
26
A hierarchical data model is a data model
in which the data is organized into a tree-
like structure. The structure allows
repeating information using parent/child
HIERARCHICA relationships: each parent can have many
children but each child only has one parent.
L DATABASE
If we want to search a record, we have to
MODEL traverse the tree from the root through all its
parent nodes to reach the specific record.
Thus, searching for a record is very time
consuming.
27
Example of a Hierarchical Model.
28
EXAMPLE OF
HIERARCHICAL DB MODEL
29
The network data model is similar to a
hierarchical model except that a record
can have multiple parents.
It can handle many-to-many (M:N)
relationships. Or in other words, it
allows a record to have more than one
parent.
Network model is also simple and easy
to design. and main advantages of
network model is data Independence
Suppose an employee works for two
NETWORK departments .
DATABASE MODEL
30
NETWORK DB MODEL
31
RELATIONAL MODEL
Relational model stores data in the form of a table.
Based on a relation, a two dimensional table.
Row in the table represents the records
Columns in the table represents the attributes of the
entity.
The order of the data in the table is not significant and
no order is implied when records are included in the
relation. 32
33
34
DBMS – COMPONENTS
Software
Hardware
Data
Procedures
Database Access Language
Query Processor
Run Time Database Manager
Data Manager
Database Engine
Data Dictionary
35
Report Writer
Software
This is the set of programs used to control and manage the overall
database. This includes the DBMS software itself, the Operating
System, the network software being used to share the data among
users, and the application programs used to access data in the DBMS.
Hardware
Consists of a set of physical electronic devices such as computers, I/O
devices, storage devices, etc., this provides the interface between
computers and the real world systems. 36
Data
DBMS exists to collect, store, process and access data, the most
important component. The database contains both the actual or
operational data and the metadata.
Procedures
These are the instructions and rules that assist on how to use the
DBMS, and in designing and running the database, using
documented procedures, to guide the users that operate 37
and
manage it.
Database Access Language
This is used to access the data to and from the database, to enter
new data, update existing data, or retrieve required data from
databases. The user writes a set of appropriate commands in a
database access language, submits these to the DBMS, which then
processes the data and generates and displays a set of results into a
user readable form.
Query Processor
This transforms the user queries into a series of low level
instructions. This reads the online user’s query and translates it
38
into an efficient series of operations in a form capable of being
sent to the run time data manager for execution.
Run Time Database Manager
Sometimes referred to as the database control system, this is the central
software component of the DBMS that interfaces with user-submitted
application programs and queries, and handles database access at run
time. Its function is to convert operations in user’s queries. It provides
control to maintain the consistency, integrity and security of the data.
Data Manager
Also called the cache manger, this is responsible for handling of data in
the database, providing a recovery to the system that allows it to
recover the data after a failure.
39
Database Engine
The core service for storing, processing, and securing data, this
provides controlled access and rapid transaction processing to
address the requirements of the most demanding data consuming
applications. It is often used to create relational databases for
online transaction processing or online analytical processing data.
Data Dictionary
This is a reserved space within a database used to store
information about the database itself. A data dictionary is a set of
read-only table and views, containing the different information
about the data used in the enterprise to ensure that database
representation of the data follow one standard as defined in40 the
dictionary.
Report Writer
Also referred to as the report generator, it is a program that extracts
information from one or more files and presents the information in a
specified format. Most report writers allow the user to select records
that meet certain conditions and to display selected fields in rows and
columns, or also format the data into different charts.
41
DBMS – APPLICATIONS
Banking
Airlines
Universities
Credit card transaction
Telecommunication
Finance
Sales
Manufacturing
Human Resource
42
THANK YOU
43