You are on page 1of 6

Database Management System

Database Management System


Data: It is a fact that can be recorded and that have implicit meaning.

Types of Data Processing


Data processing environment can be categorized according to the way data are
logically organized into two major classes.
1. File based system
2. Database approach

1. File Based System


File based systems are an early attempt to computerize the manual filing system.
For example, The University may have separate files for the personal details of
students, fees paid by them, the number and details of the course taught, the number
and details of each faculty member in various departments.
However, a manual file system crashes when cross-referencing & processing of
information in the files are carried out.
Eg: 1. Annual fees paid by the students of C.S department
2. No. of students requiring transport facility from a particular area.
Disadvantages of File based System
1. Separation & isolation of data
Data is stored in different files or locations.
2. Data redundancy
Duplication of information in different files.
3. Data inconsistency
Data stored in different file formats
4. Integrity problems i.e, Checking validity
5. Security problems

2. The Database Approach


To overcome the limitations of file based system, a new approach was
required. Hence a database approach emerged.
Database is a persistent collection of logically related data.
Eg: 1. Railway Reservation
2. Airline Reservation
3. with drawl of money from bank

A DBMS is general purpose software that manages the database and provides
facilities for storing, accessing and maintaining the data.
Advantages of DBMS
1. Reduction of Redundancies
Duplication of information is reduced. In database approach, data can be
stored at a single place, which saves space and does not permit inconsistency.

2. Shared Data
A DBMS allows the sharing of database under its control by any number of
application programs or users.

1
Database Management System

3. Data Independence
DBMS separates data descriptions from data. Hence it is not affected by
changes. This is called Data Independence, where details of data are not exposed.
DBMS provides an abstract view and hide details.

4. Data Integrity is improved.


Data integrity refers to validity & consistency of data. Data integrity means
that the data should be accurate and consistent. This is done by providing some
checks or constraint.
For example, the age of an employee can be between 18 and 60 years only.
While entering the data for the age of an employee, the database should check this.

5. Improved Security
Only authorized users may use the database by granting privileges given by
the database administrators (DBA) by providing username and password.

6. Improved Backup and Recovery


DBMS provides facilities for recovering the hardware and software failures. In
case a program fails, it restores the database to a state in which it was before the
execution of the program.

7. Support for concurrent transactions


DBMS allows multiple transactions to occur simultaneously

Disadvantages of DBMS
1. High initial investment & possible need for additional hardware.
2. Overhead for providing generality, security, recovery integrity & concurrency control.

Main Characteristics of Database


1. Self Contained nature of a database system.
DBMS contains separate system catalog which contains metadata. Metadata is
a definition & description of data.
For example, consider the student table
STUDENT
Reg_No Name Combination Class Fees
1248 Varun PCMCs I 2345.00
1273 Sathya PCMB II 1658.00
1297 Sannu PCMCs III 3126.00

The system catalog stores the definition of this file and whenever a request to
access information is made, the DBMS software refers to the catalog to determine the
structure of STUDENT file and the position and size of the various data items and the
constraints which exist if any.

2. Insulation between programs and data


Allows changing data storage structures and operations without having to
change the DBMS access programs.

3. Data Abstraction
2
Database Management System

A data model is used to hide storage details and present the users with a
conceptual view of the database.

4. Support of multiple views of data


Each user may see a different view of the database, which describes only the
data of interest to that user.

Data Models
A data model is a set of concepts that can be used to describe the structure of the
database and the different relationship and constraints which hold the data in the database.

Schema
Schema defines the tables, the fields in each table and the relationships between fields
and tables.

Instances
It is used to describe a complete database environment, including the RDBMS
software, table structure, stored procedures and other functionalities.

DBMS Architecture
In order to implement the below identified characteristics, a three-schema architecture
is proposed,
 Separation of data from the programs which use these data.
 Provide each application program with a separate interface or use a separate view.
 Store the description of the database with its constraints separately as metadata in the
system catalog
Three - Schema Architecture
In this architecture, schemas can be defined at the following three levels,
1. Internal or Physical level
2. Conceptual or Logical level
3. External or View level
    ……………
External External External External External
View View View View View

Conceptual level

DBA
Internal or Physical
level

3
Stored Database
Database Management System

1. Internal Level
It describes the physical storage structure of the database. The internal schema
uses a physical data model & describes the complete details of data storage & access
paths for the database.

2. Conceptual Level
It describes the structure of whole database for a community of users. It hides the
details of physical storage structures & concentrates on describing entities, data types,
relationships, user operations & constraints. There is only one conceptual schema per
database.

3. External Level
It includes a number of external schemas or user views. The user can be either an
application program or an end user. It describes the part of the database that a particular
user is interested in and hides the rest of the database from user.
Eg: In college database, the user group in the office views only the personal details of
student, where as accounts department views the fees details.

Data Independence
The capacity to change the schema at one level of database system with out
having to change the schema at the next higher level. The disjointing of data descriptions
from the application programs that uses the data is called Data Independence.
There are two types of data independence,
1. Physical Independence
The ability to modify the physical level without causing application programs to
be re-written. Changes in the physical files are induced to improve the performance of the
system for faster update & retrieval.

2. Logical Independence
The ability to modify the conceptual level without causing application program
to re-written. This is usually done when logical structure of database is altered.
Eg: Inserting one more column namely, contact_no to the CUSTOMER database should
not affect the external views.

Database Languages and Interfaces


Data languages are the languages used to interact with the database as visualized
through the data model.

1. DDL (Data Definition Language)


The DDL is a facility used to define the conceptual schema. The conceptual
schema is basically used to describe the data item & the relationship between them. i.e, it
includes all the entity sets, their associated attributes & all the relationships among the
entity sets.
The DBMS will have a DDL compiler whose function is to process the DDL
statements in order to identify descriptions of the schema & to store the schema
description in the DBMS catalog.
The main advantage of the DDL is its description contains English like
statements & used to produce the database.
Eg: CREATE, ALTER, DROP
2. DML (Data Manipulation Language)
4
Database Management System

Data Manipulation involves retrieval of existing data, insertion of new data & deletion
of data or modification of existing data.
Extraction of information from the database using DML operation is called a
Query.
Eg: SQL> SELECT * from STUDENT
WHERE Reg_no=12345;
The two types of DML statements are ,
1. High level or Non Procedural DML
In this, the user has to just indicate the data which has to be retrieval from the
database without bothering about the method or steps involved in retrieval process.

2. Low level or Procedural DML


Here, the user not only has to indicate the data to be retrieved but also the
method of retrieving this data.

Database Users
Based on all the requirements & the important characteristics, database users can
be classified into the following types

(i) Application Programmers


Application programs are specific purpose programs developed for interaction
with the system through DML calls which arte embedded in a program written in a host
language. The computer professionals who developed such programs are termed as
application programmers.

(ii) Sophisticated Users (Casual Users)


The casual users have no knowledge of any programming language. They
interact with the system with the use of a query language.

(iii) Specialized Users


They are specialized in database applications. They are able to convert the
existing system in terms of their specialized applications depending on their
requirements.

(iv) Native Users


These users interact with the system by invoking an existing application
program to satisfy their need. i.e, they provide the input to the system through an
available interface & the existing application program generates the output.
Eg: Seeing the University Results

Database Administrator (DBA)


DBA is a person responsible for the design, implementation, maintenance and
repair of an organization’s database.

Functions of DBA
i. He plans & creates databases.
ii. He manages database availability
iii. Manages storage based on design
iv. Manages physical and logical structure
v. Manages security
vi. Network Administration
5
Database Management System

vii. He takes Backups regularly & recovers the database, if it is accidentally erased.
viii. Tuning the performance of database.

You might also like