Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
6 views

DBMS chapter 01 - Subhash published

The document provides an introduction to Database Management Systems (DBMS), highlighting their importance in various applications such as banking, inventory, and hospital management. It distinguishes between traditional and advanced database applications, explaining the characteristics of a database approach, including self-describing nature, data independence, and support for multiple user views. The document also discusses data models and the role of metadata in defining and accessing database structures.

Uploaded by

Keerthana
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

DBMS chapter 01 - Subhash published

The document provides an introduction to Database Management Systems (DBMS), highlighting their importance in various applications such as banking, inventory, and hospital management. It distinguishes between traditional and advanced database applications, explaining the characteristics of a database approach, including self-describing nature, data independence, and support for multiple user views. The document also discusses data models and the role of metadata in defining and accessing database structures.

Uploaded by

Keerthana
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

INTRODUCTION TO DBMS

I INTRODUCTION
lu our ovvday lite in the ndern ovety, we rome srOsR batabnst% nnd
database syxtems quute trequently. Several uetivitios on daytoday basis rnqte
the interaction with one or another datalae or oxample, batik trausfittz like
depsit or withdrawal of money, railway or airine reservation, borrwwing m
returning a book trom a cemputeric library. purchasing items frth 4
tepartmental store or through Internet, computerized hospital managsnent. tt
allinvolveaccessing and interacting with databasos, Databas%play att itnurtant
ole in almost all areas where computers are used, incuding busi88, clectrnie
wmmerve, engineoing, nedicine, law, oducation and library sCiencs, to name a

Traditional Database appllcations


In the traditional database applications, most of the information stored and
acvessed is cither testualor numorie. Some traditional database applications are
Banking
Inventory
Airine reservation
Library management
lospital management
Advanced Database applications
Sone of the advanced applications of database systems are
Multimedia databases - that can store pictures, video clips and sound
messap:e8.
Geographie information systems (GIS)-that can store and analyze
2 Database Management Systerm and Software
Engineering
maps, weather data and satellite images
Data warehouses and Online analytical processing (0LAP) that
are used in many companies to extract and analyze useful informatio
from very large databases for decision-making.
Real-time and Active database technology - that is used in
controlling industrial and manufacturing processes
Mobile Databases They are available on the users portable
computers. Users interact with the mobile database application, which
in turn accesses the data stored in the mobile databases through tho
DBMS.
Web Databases databases are integrated with Web to support
business operations like e-commerce, supply chain management or web
publishing
Spatial Databases -provide concepts for databases that keep track of
objects in a multidimensional space ex. Data in CAD/CAM. (Computer
Aided Design and Computer Aided Manufacturing systems.)
1.2 BASICS OF DATABASE TECHNOLOGY
1.2.1 DATA
Data is a collection of known facts, figures or statistics that can be recorded
and that is meaningful. Data can be text, numbers, audio, video or any
combination of these. Data in its raw form may not be useful for decision-making.
It must be processed s0 as to become useful.
1.2.2 DATABASE
It is collection of related data, having valid and implicit meaning and is
designed to meet the information needs of an organization.
Example 1 : A personnel Telephone directory, which contains name, address
and telephone numbers, arranged in some particular order, say
sorted according to name, acts as a collection of related data,
having valid and implicit meaning and hence it is a telephone
database.
Example 2 : A college staff register, containing the data regarding name,
of joining, basic salary, net salary etc. for each staff member, whe
arranged in some order, becomes a Staff database.
Example 3: There can be a student database containing the details of the
functions.
Functions of
DBMSstoring is
enables
allows 1.2.3 Implicit Introduction
DBMS to
to
A 5. 4. 3. 2. 1.
v) iv) i ) i ) i) DBMS provideaccess
Sharing
users
database
and MANAGEMENT
DATABASE
management
SYSTEMsystem. needed. Ameaning.
that purpose.
A amount A A
database. some A
Properties
interaction
Protecting Defining
Constructing
Manipulating application applications
retrieving database databasedatabasedatabase database
is
an of to users source mother's
students
a the
databases management create of
purpose
general
a environment
the database data programs may of
database
can data can is is andrepresents
with from
database the the and a Database name, like
database contained besearch isdesigned,logically
multipleevents
database
among involved, be which register
maintain generated of mark#
information. that system written any some
for, builtcoherent users data
various software in in
is the size number,
detail
the a
(DBMS) specifically and retrieve the aspect is
both
database. data and
database, and whoderived,
users maintained collection real
system convenient must populated are of etc.name,
is and any the
"This a for be
interested world,
There
that The update level of real date
collection that organized
is manually with data There
and
prímary a of of
performs task in l
wiworld,
software the
complezity. birth,
efficient data with the he
of or or and vwill
goal
programns data somm A father's
the byby for somecontent8 databazs be
system
of a managed,
to a # deyre
following a databasegroupwhenever If ínhernt multipie
useDBMS specific of namt,
that that huge th has
in of s of
data. controlled (1) 4
Data
Meta DBMS
andCatalog database
catalog.
DBMS DATABASE 1.2.4
onlySYSTEM and database.
creating
concurrently
(v) (iv)querying (iii)DBMS. by (ii) data
(vi) (orinconsistent
when crashes), to
storage The contains Maintenance
TheMaintenance This
Protection This
Sharing Manipulating This Constructing This This
The database
Defining
be a vi)
structure the Maintenance
stored
rmation catalog database the includes function includes is involves
format and i.e. database the
the system a
security of
multiple database in
contains process
of database
and and of ofsystem
database allows functions a the the
specifying
each requirements databasethe database of
such constraints. the to database database.
database protection a
information multiple
users retrieve of database
data DBMS protection
as but storing
such the
ucture item Management
Database
Systerm
also can specific as data
This
software change byagainst
users
and a the
such the against use updating
complete
definition types,
ofvarious
data, data
each DBMS
over the and
as together unauthorized
the hardware database programs onstructures
file, a and the
constraints definition periodallows
structure is some
the stored is database
generating
a
type Database ofthe simultaneously
or or to storage and
or time. software Engineering
Soltwareand
on of in system malicious access
and each what
description to constraints
the reports medium
reflect
ge system.
data. file, is tomalfunction the
called evolve access.
the database from
changes
without that for
of 1t
rna! ty the
tu te n as ix th.
in
database
definition meta-data.
Environment
Databasse
ItSysterm calledltIntroduction
of DBMS lo
DATABASE
SYSTEM memory consists each
First 5. 4. 3. 2 1. The
Software
The DBMS
metadata Software
Application diagram data
designer
(metadata).
where the of
physical the item
Figure data
Databasc
Stored the catalog to following:
to
SOFTWARE
DBMS should programs
access
process
ofdescribes and
(metadata)
Definition database This type,stored Figure
1.1 Software constraints
which the
Typical Software Programs/Queries
Application is be
structure, these 1.1
called database or
the
to isstored stored shows structure
to process
stored contains queriesqueries
Database on
acccss defining in
constraints data
is the the
the written
querics/programs
storcd called he
tapplication
or typical of
data
System e
thDBMS the
data Stored
database. for stored by primarystored
DatabaseStored database database.
users
nvironment catalog the
database. on
databaseprogramS or
The data the
as programmers system
DBMS
specified
physicalstored
definition environment.
catalog
location
database by
the or is 5
Database Management Systern and Software
6
Engineeni
The application programs or queries that are written by the user or programma
n,
are processed by the DBMS software so as to perform the required function. Th
DBMS software can also perform functions like storing the data in the speciff
structure, manipulating with the database performing operations like updation
retrieval etc. VWhenever a request to access data is made, a part of the DBMS
software first refers to the metadata to access the structure and hence determines
the size and position so as to access data from the stored database.
1.3 CHARACTERISTICS OF A DATABASEAPPROACH
A number of characteristics distinguish the database approach from the
traditional file approach. In the database approach, a single repository of data is
maintained. This database is defined once and is then accessed by various users,
The main characteristics of the database approach are:
i) Self describing nature of a database system (
ii) Program data independence and data abstraction
iii) Support of multiple views of data
iv) Sharing of data and multi-user transaction processing
(1) Self describing nature of the database
In a database approach, the database system contains not only the database
but also the complete definition of the database. The definition includes structure
of the file, the type and storage format of each data item and is stored in the
C
system catalog. The information stored in the catalog is referred to as metadata
and it describes the structure of the primary database.
DBMS software refers to the catalog to know the structure of any database.
The DBMS software can access various databases by extracting the database
definition from the catalog and co-relating the database with the definition. The
C
definitions of all the files are stored in the catalog. When a request is made to
access the name field of a student record, the DBMS software refers to the catalog
d
to first find the structure of the student file and then the size and the location d
the name field within the student record.
(ii) Program Data Independence and Data Abstraction
In a DBMS environment, if a new field is to be added to the student file
only the student file definition in the catalog has to be changed and no change
needed in the programs that access the database. This is known as Progra ti
Data Independence. The next time a DBMS program refers to the catalog, t
the data,
independence called
details
programs can as
operands
operations can data starting
(number methodIntroduclion
new DBMS to
operationsare Program
be
which A The Data Many beThe Ancan In The structure
DBMS of hidden
altered operation
The An recent be byte ofFigure of
property filerefer regardless
implementation internal
does abstraction other by interface stored characters storage
is Operation data within Major Class
Reg_No Name Data item
provides called storage tofrom invoking developments of
not without 1.2
lemented. that the details typescontains along student
for
database of implementation
include from which
a Internal
Dataallows conceptualto how record in a
the of the of with student
the Independence. altering or each record
the file the its two
Abstraction.
many user database operations the includes storage
program users
storage arguments. the even and Starting
position
catalog operations parts: record). recordthe in record. will
with
of representation the
method definition th e its
by of
the the the length format 35 30 26 be
only users. organization interface. operations a 1
datawhenever Each file accessed
details DBMS. from of name
are
th
independencee operation itself. in may for
being the of bytes. data
conceptual of required.Database of User the that typical
be a and
how such definition item
files implemented.
operation are defined Data
field used.
is
the as
programs specified width
and to may student 10 05 05 25
and Fiyure
data
representation This usersacces8 be by
program DBMS and be
carried
is provides specified record its
andpaths This
providing separately can
stored record 1,2
extracts
application #how»
is out
operation on use
or what termed on length by
of a these
how the the file the and the the
is its 7
8 Database Management System and Softuvare

A Data Model is a type of data abstraction that is used to provide


Engineering Intro

conceptual representation. It uses logical concepts that can be easily (1)


understoo
rather than the computer storage concepts. A data model always hides the detat
of the data storage and implementation from the user.
(iii) Support Of Multiple Views Of Data
A database will usually have multiple users, where different users may neod
different views, different parts of the database. A view, i.e. the required part may
be directly available in the database (stored) or it may have to be derived from (i
the existing data.
a

(iv) Sharing Of Data and Multi-User Transaction Processing


In a database approach, a single repository of data is maintained by
integrating data from multiple applications. Different users can share the data
from the same database with a multi user DBMS. It is required that multiple
users access the same data at a time. For this, DBMS must have a concurrency
control to ensure that several users trying to update the same data do so in a
controlled manner so that the result of the updation process is correct. For
example, in any flight reservation system, the reservation clerks should not tryto
allot the same seat to different persons. DBMS should take care to see that only
one clerk would have the access to the seat at a time. These are called On Line
Transaction Processing (OLTP) applications.
So multi-user DBMS software should see that concurrent transactions are
operated correctly.
1.4 DATABASE USERS

For a small personal database, a person typically defines, constructs and


manipulates the database. However, many persons are involved in the design, use
and maintenance ofa large database with a few hundred users. Their jobs involve
the day-to-day use of a large database. There are others who work to maintain
the database system environment, but who are not actively interested in the
database itself.
There are two categories of people behind DBMS. They are:
i) Actors on the scene
ii) Workers behind the scene
Introduction to DBMS

() Actors on the scene


The persons involved in the design, use and maintenance of large databases re.
Database Administrator (DBA)
Database Designer
End User

Software Engineer( System Analyst and Application Programmer)


(ii) Workers behind the scene
The persons who work to maintain the database environnent but are not
actively involved in the database itself are:
DBMS system designers and implementers
Tool developers
> Operators and maintenance personnel
1.4.1 DATABASE ADMINISTRATOR (DBA)
In a database environment, the primary resouree is the database itself and
the secondary resource is the DBMS and its related software, In an organization,
many users share these resources. Then there arises a necd to manage these
resources. The DBA is responsible for authorizing access to the database,
coordinating and monitoring its use and for acquiring software and hardware
resources as needed. The DBA is aceountable for problems such as breach of
security or poor system response time.
The person controlling and coordinating the DBMS system is called the
Database Administrator (DBA).
The responsibilities of the DBA can be listed as follows:
1. The DBA administers the three levels of the database like internal level,
conceptual level and external level of the DBMS architecture and, in
consultation with the overall user community, sets up the definition of the
global view or conceptual level of the database. The DBA further specifies
the external view of the various users and applications He is responsible for
the definition and implementation of the internal level, including the
storage structure and access methods to be used for the optimnum
performance of the DBMS. Changes to any of the three levels necessitated
by changes or growth in the organization andor emerging technology are
under the control of the DBA. Mappings between the internal and the
conceptual levels, as well as between the internal and conceptual levels, as
DutabaSe Munageent System and Software
Engi
also defined
neer
by
in,
well a between the coneeptual and external levels, are
DHA

The D1A ahoull ensure that appropriate measures are in place to maintai.
not accessible
he integrity of the database and that the database is
unanthorizod uers, "The DBA is responsible for granting permission to th.
datatbas
unOrA Of the database and stores the profile of each user in the
portion d
Thin profile deseribes the permiBsible activities of a user on that
User views, Th.
the databane Hecessible to the user through one or more
particular
wBOr profile can be used by the database system to verify 80 that a
database.
#AOr eforms given operation on the
database
The DIA is als0 responsible for defining procedures to recover the
lo8:
fromfailres dE to humn, natural, or hardware causes with minimal
continue
of data Ihis reeovery procedure should enable the organization to
continue to be
to funetion anl the intact portion of the database should
nVailable,

1.4.2 IDATABASE DESIGNERS

Database designers are responsible for identifying the data to be stored in


this
the database and for choosing appropriate structure to represent and store
the end
data, It is the responsibility of the database designers to interact with all
uern of the database and understand their requirements and then design the
database to fulfill all the uBer requirements. The database designers interact with
database those cater to the
Variou# UR0T Hroups and develop various views of the
requurements of the individual groups. Finally all views are integrated to produce
the final databaHe, which meets the requirements of all the user groups.

1.4.3 END USERs


End unerA re the people who access the database for querying (retrievin
data for # pecific requirement) , updating and generating reports. There a
dilferent eategories of end users, They are:
) CaMual end users
i) Naive or parametric end users
i) Sophisticated end useTs
iv) Stand alone users
Introduclion to DBMS 11

i) Casual end users


They are the end users who occasionally access the database. Each time,
they may require different information from the database. They use sophisticated
database query language to specify their requests. They need to know only few
facilities, which they are concerned with and may be used repeatedly.
ii) Naive or parametric end users
Most number of database end users is the naive or parametric end users.
They constantly make use of the database, querying and updating the database.
They utilize standard types of queries and updates called canned transactions,
which are carefully programmed and tested. Naive users need not know much
about the facilities provided by the DBMS. They only have to understand the user
interface of the standard transactions designed and implemented for their use.
For example, Bank tellers do the functions of checking account balances and
pOsting the transactions like withdrawals and deposits.
Reservation clerks for Airlines, Railways and hotels check for the
availability of the facilities may be seats or rooms and then accordingly make
reservations.

iii) Sophisticated end users


They include engineers, scientists, business analyst, who thoroughly
familiarize with the facilities of DBMS to meet their requirements. They learn
most of the DBMS facilities in order to achieve their complex requirements.

iv) Stand-alone users


They maintain personal databases by using readymade packages. These
interfaces. For
packages provide easy to use menu based or graphics based
example, users of tax packages, financial packages, etc. store a variety of personal
the
using
hnancial data for tax purposes. Such users become well versed in
particular software package.
1.4.4 SYSTEM ANALYSTS AND APPLICATION PROGRAMMERS
(Software Engineers)
generally referred to as
System Analysts and Application Programmers are
Software Engineers.
users, especially naive
System analysts determine the requirements of end
12 Database Management System and Software
Engine r
and parametric users and develop specifications for canned transactions that mo.
ing
these requirements.
Application programmers implement these specifications as program.
test them and debug, document and maintain them.
These analysts and programmers must be aware of all the facilities provide:
by the DBMS, so as to accomplish their tasks.
1.4.5 DBMS DESIGNERS AND IMPLEMENTERS
These are the persons who design and implement the DBMS softwam
package and implement it. The DBMS software consists of many complex modules
like modules for implementing the catalog, processing query
language, processing
the interface, accessing and buffering data, controlling concurrency and handling
data recovery and security.
1.4.6 TOOL DEVELOPERS
Tools are software packages that facilitate database system
design and
usage and help in improving performance. Tools include packages for database
design, performance monitoring, graphical interfaces, simulation, and test data
generation. Tools are optional packages and are often available
separately.
Tool developers are the persons who design and implement such tools.
1.4.7 OPERATORS AND MAINTENANCE PERSONNEL
These are the system administration personnel who are
actual running and maintenance of the hardware and software
responsible for the
the database system. environment for

1.5 ADVANTAGES OF DBMS


A good DBMS should posses certain capabilities. With these
DBA must achieve a variety of objectives related to the capabilities, the
and use of a large multi-user database.
design, administration,

1.5.1 CONTROLLING REDUNDANCY


In the traditional file approach, each user
example, an educational institute maintains maintains his/her own file. For
the details of its students.
Registration officer maintains the names of the students, date of joining and
Course to which they have registered. The accounting officer
name, course to which he is admitted, date of joining and maintains students
fees details. Thog
Introduction to DBMS
13
most of the information required by both the
not same. Because of this, they have to
officers is the same, but exactly it is
maintain separate files.
student, date of joining and class are repeated in both the files, Name of the
i.e. they are
stored in duplicates. This existence of the same data in
multiple places or the
replication of the same data or duplicate data existence is known as Data
redundancy.
This redundancy in storing the data in multiple
files has some
y disadvantages.
There is wastage of manual effort to store it in muitiple files.
} There is wastage of storage area.
There is the problem of updation, i.e., if course name is to be
may happen that it is changed in one file and not in other files.
changed, it
Even if updation is applied to all the files, it may still be
inconsistent,
because individuals may not update it properly. Ex., if we want to
update date of joining, one may update it as 10-10-1998 to 01-10-1998
and other one may change it to 10-01-1998.
In the database approach, to avoid this redundancy, we have a database,
which stores each data item such as student's name or birth date in only one
place. This avoids inconsistency by saving effort, storage area and by providing
efficient updation.
1.5.2 RESTRICTING UNAUTHORIZED ACCESS
In order to maintain the security of the data, access to the database has to
be controlled in an environment where multiple users share a large database.
Usually, financial data is supposed to be confidential and for such databases users
must be authorized to access it. Retrieving data and updating the data are two
different types of access. Some users may be only authorized to retrieve the data
and not to update it. Some may be authorized to do both. Typically, users or user
groups will be given some account numbers protected by passwords, through
which the database can be accessed.
The same strategy can be applied to DBMS software, where naive users are
permitted only to retrieve the database by canned transactions.
1.5.3 PROVIDING PERSISTENT STORAGE FOR PROGRAM OBJECTS AND DATA
STRUCTURES
Databases can be used to provide persistent storage for program objects and
data structures. This is one of the main reasons for the emergence of the object
Database Management System and Sollware
14
Engin
database systems are compatible
e nin,wi
Introd
oriented database systems. Object-oriented
JAVA and the DBMS
programming languages such as C++ and
automatically performs any necessary conversions from the complex structuressoftware 1.5.7

the languages to a format suitable for file storage. Hence, a complex object in many
C++ can be stored permanently in an object-oriented DBMS. such as ObjectStore relatis
or 02. Such an object is said to be persistent, since it survives the termination af and e
program execution and can later be directly retrieved by another C++ program 1.5.8
Object-oriented database systems typically offer data structure compatibilit;
with one or more object oriented programming languages.
1.5.4 PROVIDING STORAGE STRUCTURES FOR EFFICIENT QUERY PROCESSING
Database systems must provide capabilities for efficiently executing queries
and updates. Auxiliary files called indexes are used by DBMS to speed up disk
search for the desired records. Also bufferingmodule of DBMS maintains parts of
the database in main memory buffers. The query processing and optimization
module of the DBMS is responsible for choosing an efficient query execution plan
for each query based on the existing storage structures.
1.5.5 PROVIDING BACKUPS AND RECOVERY
In a DBMS, always there should be a facility to recover from hardware and
software failures. This facility is called the Backup and recovery subsystem of
the DBMS. For example, if the system fails when an updating program is under stage
softw
execution, the recovery system should see that, the database is restored back to enter
its initial state i.e. the stage before starting the execution. Alternatively, the
recovery subsystem could ensure that, the program is resumed from the point at
which it was interrupted. Also, the system should provide automatic backup may
this
facility in order to avoid power failure problems. datal
1.5.6 PROVIDING MULTIPLE USER INTERFACES
1.5.9
Since different types of users with different levels of technical knowledge
use a database, DBMS must provide variety of interfaces. These include query obtai
language for the casual users, programming language interface for application calle
programmers, forms and command codes for parametric users and menu driven
Conv
interfaces and natural language interfaces for stand-alone users. Graphical User prov
Interfaces (GU) consists of both forms-style interfaces and menu-drivet auto
interfaces. These GUIs can be specified with the help of specialized languages and
onvironments.
Introduclion to DBMS 15

1.5.7 REPRESENTING COMPLEX RELATIONSHIPS AMONG DATA


A database may include numerous varieties of datathat are interrelated in
many ways. A DBMS must have the capability to represent a variety of complex
relationships among the data as well as to retrieve and update related data easily
and efficiently.
L.5.8 ENFORCING INTEGRITY CONSTRAINTS
Adatabase always has certain integrity constraints to be followed.
Theconstraints that can be enforced are
i) The type of the data field must be specified for each data.
ii) Thewidth of data should be specified i.e. the number of characters
For example, Name field in University database should contain not more
than 25 alphabetic characters or Grade field can have only one character
entry and only 'A' to 'C.
iii) A record in one file must be related to records in other files. For
example, every section name must be related to a course name.
iv) Another type of constraint applies the uniqueness of data.
Ex. Register_no must be unique for every student in a student database.
The database designers must incorporate these constraints in the design
stage of the database. Some constraints can be directly enforced by the DBMS
software itself and some have to be enforced through update programs or while
entering the data.
Sometimes, incorrect data may also satisfy the constraints. Ex. The grade 'B'
may be wongly entered, as 'C, but still it is acceptable to the constraints and
this type are unavoidable. Manually tracing the error and then correcting the
database can only avoid these problems.
1.5.9 PERMITTING INFERENCE AND ACTIONS USING RULES
Some database systems provide capabilities for defining deduction rules for
obtaining new information from the stored database facts. Such systems are
called deductive database systems. If the rules change, it is generally
Convenient tochange the declared deduction rules. More powerful functionality is
provided by active database systems, which provide active rules that can
automatically initiate actions.
16 Dalabase Manazement System and Sofuware

REVIEW QUESTIONS
Engirne n
1 Mention a few traditional database applications.
2 Mention afew advanced database applications.
3 Define the terms:
i) Data
ii) Database
iii) DBMS
iv) Database system
v) Meta data
vi) DBMS Catalog
4. List any three implicit properties of
5.
Database.
Give any three examples of Databases.
6.
Explain the functions of DBMS.
7. Draw a neat diagram showing the
and explain briefly. simplified database system environment
8. Explain the characteristics of database
9.
Explain the concept of Data Abstraction.approach.
10. Explain the following:
i) Program Data independence
ii)Program operation independence
11. What is a data
12.
model? What is its purpose?
Expand DBA. What is the role of a DBA?
13. Discuss
about various people involved with
14. Write a
note on various types of End
DBMS.
15. users using DBMS.
Explain the
16. Explain the implications of Database approach.
17. advantages of DBMS.
What are the
18. circumstances when a DBMS should not be used?
What is the difference
independence? between logical data independence and
19. Explain the
physical data
responsibilities of DBA.
20. Explain overall
21. Explain the structure database system with detailed diagram.
of
different applications traditional database.
of

You might also like