AMITY SCHOOL OF BUSINESS
BBA, SEMESTER 1
COMPUTER APPLICATIONS
ARPAN SINHA
1
MODULE V
Database Management System
2
Data – Collection of raw facts and
figures .
Information – processed
DATA , meaningful and usable data.
DATABASE Database - collection
interrelated data items.
of
AND DBMS Database System - collection of
interrelated data items that is
organized so that it can easily be
accessed, managed, and updated .
3
A DBMS is a complex set of software
programs that controls the organization,
storage, management, and retrieval of data in
a database.
DATABASE The primary goal of a DBMS is to provide a
MANAGEMEN way to store and retrieve database
information that is both convenient and
T SYSTEM efficient and secure.
A DBMS contains collection of inter-related
data & collection of programs to access the
data
4
THE TRADITIONAL FILE APPROACH TO DATA
MANAGEMENT
Application
Data Files Reports
Program
The Traditional File Approach
Separate files are created and stored for each application program.
Very common from the 50’s through the 80’s.
5
Example: Student Data in a University.
Student address may be needed for
registering, library management, financial
office, grade reporting, etc.
Each application separately maintains its
data files and programs to manipulate those
files.
Possibly different formats for the same data
(Eg: Length of name)
THE TRADITIONAL
Redundant updates (E.g.: to change an
FILE APPROACH address).
6
Drawbacks of using file systems to store
data:
Data redundancy and inconsistency
Multiple file formats, duplication
of information in different files
Integrity problems
PURPOSE OF Hard to add new constraints or
DATABASE change existing ones.
SYSTEMS
7
- Atomicity of updates
Failures may leave database in an
inconsistent
state with partial updates carried out
Example: Transfer of funds from
one account to another should either
complete or not happen at all
- 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
DBMS Hardware Independence
Speed
CHARACTERISTICS
11
The major purpose of a database
system is to provide users with an
abstract view of the system.
The system hides certain details of how
data is stored and created and
maintained
Complexity should be hidden from
database users.
Data abstraction is the process of
DATA distilling data down to its essentials.
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
The ability to modify the conceptual scheme
without causing application programs to be
rewritten
Usually done when logical structure of database
is altered
17
18
DBMS – LANGUAGES
Database Language – to create and manipulate data 3
Types
Data Definition Language (DDL)
Used to specify a database scheme
DDL statements are compiled, resulting in a set of tables stored in a
special file called a data dictionary
The data directory contains metadata (data about data)
19
Data Manipulation Language (DML)
Language which enables users to access and manipulate data. The
goal is to provide efficient human interaction with the system.
There are two types of DML:
Procedural: the user specifies what data is needed and how to
get it
Nonprocedural: the user only specifies what data is needed
A query language is a portion of a DML involving information
retrieval only.
20
Data Control Language
Language which enables data security.
Creates users and assigns permissions and rights to the
various users.
21
DBMS – USERS
Database Administrator
Person having central control over data and
programs accessing that data.
Duties of the Database Administrator include:
Scheme definition
Storage structure and access method definition
Scheme and physical organization modification
Granting of authorization for data access 22
Integrity constraint specification
Application Programmers
computer professionals interacting with the system
through application programs written in a host
language.
Sophisticated users
Interact with the system without writing programs.
They form requests by writing queries in a database
query language.
Specialized users
Sophisticated users writing special database application
programs. These may be CADD systems, knowledge-
based and expert systems, complex data systems
(audio/video), etc.
Naive users
Unsophisticated users who interact with the system by
using permanent application programs (e.g. automated
teller machine).
23
Data independence
Efficient data access
DBMS
ADVANTAGES
Data integrity & security
Data administration
Concurrent access, crash recovery
Reduced application development time
24
The Cost of using a DBMS
Require expertise and resources to
administer DBMS –
DISADVANTAGES
Database Damage
Confidentiality, privacy and security
More difficult recovery
25
DATA MODEL
Integrated collection of concepts for describing data,
relationships between data, and constraints on the data
in an organization.
The data in a database is organized according to a
database 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.
In a database, an entity type is the
equivalent of a table; each individual
HIERARCHICAL DB record is represented as a row and an
MODEL attribute as a column. Entity types are
related to each other using 1: N mapping,
also known as one-to-many relationships.
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