Chapter 1 - Introduction to DBMS
Chapter 1 - Introduction to DBMS
Chapter one:
Introduction to Database Systems
1
Database
By data, we mean known facts that can be recorded and that have
implicit meaning.
For eg: Consider the names, telephone numbers, and address of the
people you may know. You may have recorded these data in an
indexed book or stored in a hard disk of a computer with help of
some softwares like MS-Excel or MS-Access.
This collection of related data with an implicit meaning is a
database.
2
Properties of a database :-
3
File Organization
The database is stored as a collection of files.
5
An example of a large commercial database is Amazon.com. It
contains data for over 20 million books, CDs and DVDs, videos,
games, electronic items, and many other items.
This database occupies 2TB storage area and is stored on 200
different server computers. About 15 million visitors access
Amazon.com every day and use the database to make purchases.
The database is continually updated as new books and other items
are added to the inventory and stock quantities are updated as
purchases are transacted.
About 100 employees are responsible keeping the Amazon.com
database up-to-date.
6
Data Base Management System (DBMS)
7
The database definition or descriptive information is also stored in
the database in the form of a database catalog or dictionary; it is
called meta-data.
An example for a meta-data is as follows
create table employee
( empid number not null,
empname char(25) )
Constructing the database is the process of storing the data on
some storage medium that is controlled by the DBMS.
Manipulating a database includes functions such as querying the
database to retrieve specific data, updating the database to reflect
changes in the mini world, and generating reports from the data.
Sharing a database allows multiple users and programs to access
the database simultaneously.
8
Other important functions provided by the DBMS include
protecting the database and maintaining it over a long period of
time.
Protection includes system protection against hardware or
software malfunction (or crashes) and security protection against
un-authorized or malicious access.
9
• There are general-purpose DBMS softwares as well as special-
purpose DBMS softwares to implement a computerized
database.
• Most DBMSs are very complex software systems.
• The database and DBMS software together called as a
Database System.
10
A simplified database system environment
11
File system
Traditionally, data accessed through computers has been
stored on different storage media in the form of individual
files.
Files proved to be quite satisfactory as long as
computerization was limited to few application areas.
However, the number of users became increased, especially
with the advent of internet and online transaction systems, the
file systems gave rise to many serious problems.
The discipline of database systems evolved in response to
these problems.
12
Problems with file systems
Most data processing systems use files for storing, accessing,
and manipulating data.
Files are typically stored on magnetic tapes and disks.
Most of the problems with files arise out of the fact that, the
files are specific to an application.
As application increases, the total number of computerized
files also grow considerably.
13
A large number of files gave rise to the following problems.
Files involve a high level of redundancy in data; ie, same data
item being stored at many different places.
Individual files are not adaptable to rapid changes, especially
with respect to the way the data items are structured within the file.
Data stored in a file system is purely dependent of the physical
medium used.
In file system, only pre-defined questions can be answered.
Modifications in one program may require modifications in
other programs, which interface with this program.
14
Why do we need a database?
Size of Data
Ease of Updating Data
To manage large chunks of data
Accuracy
Security of data
Data integrity
15
Data Abstraction
understanding of the two types of data representation -
Physical & Logical representation, lets discuss what is
data abstraction?
DBMS supports Data abstraction.
By Data Abstraction we mean DBMS provide users with
an abstract view of the system. i.e, the system hides
certain details of how data is stored, created and
maintained.
Main purpose of a database system is to hide complexity
from database users.
16
3 Levels of Abstraction
Physical Level
logical (Conceptual)Level
View level
17
Levels of Abstraction
Physical level:
• describes how a record (e.g., customer) is stored.
– The level that is closest to physical storage.
– Deals with ‘How the data are stored physically’.
– It’s the lowest level of abstraction
Logical (Conceptual)level:
• describes data stored in database, and the relationships among the data.
– Database Administrator level.
– Describes what data are stored.
– Describes the relationships among data.
Eg:
type customer = record
customer_id : string;
customer_name : string;
customer_street : string;
customer_city : string; 18
View level:
The level that is closest to the users.
Its concerned with the way the data seen by individual
users.
Describes part of the database for a particular group of
users.
Can be many different views of a database.
19
Characteristics of the database approach
In the database approach, a single repository of data is maintained.
That is, defined once and then accessed by various users.
In file systems, each application is free to name data elements
independently.
In contrast, in a database, the names and labels of data are defined
once and used repeatedly by queries, transactions, and
applications.
20
1) Self- describing nature:-
database system contains not only the database itself but also a
complete definition or description of the database structure and
constraints.
This definition is stored in the DBMS catalog, which contains
information such as the structure of each file, the type and storage
format of each data item, and various constraints on the data.
The information stored in the catalog is called meta-data, and it
describes the structure of the primary
database.
21
2) Insulation between Programs and Data, and Data Abstraction:-
In traditional file system, the structure of data files is embedded in
the application programs, so any changes to the structure of a file
may require changing all programs that access that file.
By contrast, DBMS access programs do not require such changes
in most cases. The structure of data files is stored in the DBMS
catalog separately from the access programs.
This property is known as program-data independence.
22
DBMS provides users with a conceptual representation of
data that does not include many of the details of how the data
is stored or how the operations are implemented.
This characteristic is called as data abstraction.
Many other details of file storage organization - such as the
access path specified on a file- can be hidden from database
users by the DBMS.
23
3) Support of Multiple Views of the Data:-
A database typically has many users, each of whom may
require different viewpoint of the database.
A multiuser DBMS, as its name implies, must allow multiple
users to access the database at the same time.
The users will have variety of distinct applications which
defines multiple views
24
4) Sharing of Data and Multiuser Transaction Processing:-
The DBMS must include concurrency control software to ensure
a controlled, correct updation since several users may try to
update the same data in a multiuser DBMS.
For example, when several reservation clerks try to assign a seat
on an airline flight, the DBMS should ensure that each seat can be
accessed by only one clerk at a time for assignment to a passenger.
These types of applications are generally called online
transaction processing (OLTP) applications.
25
A fundamental role of multiuser DBMS software is to ensure that
concurrent transactions operate correctly and efficiently.
A transaction is an executing program or process that includes
one or more database accesses, such as reading or updating of
database records.
26
Actors on the Scene
27
Database Administrator (DBA)
• In a database environment, the primary resource is the database
itself, and the secondary resource is the responsibility of the
DBA.
• The DBA is responsible for authorizing access to the database,
coordinating and monitoring its use and acquiring software and
hardware resources as needed.
28
Database designers
Database designers are responsible for identifying the data to be
stored in the database and for choosing appropriate structures to
represent and store this data.
It is the responsibility of the database designers to communicate
with all prospective database users in order to understand their
requirements and to create a design that meets these requirements.
Database designers typically interact with each potential group of
users and develop views of the database that meet the data and
processing requirements of these groups.
The final database design must be capable of supporting the
requirements of all user groups.
29
End user
End users are the people whose jobs require access to the database
for querying, updating, and generating reports; the database
primarily exists for their use.
There are several categories of end users:
Casual end user: they access the database occasionally, but they
may need different information each time.
Casual users learn only a few facilities that they may use repeatedly.
Naive or parametric end user: their main job function revolves
around constantly querying and updating the database, using
standard types of queries and updates- called canned transactions-
that have been carefully programmed and tested.
Eg. Clerical staff in any bank is a naïve user. They don’t have
any dbms knowledge but they still use the database and
perform their given task.
30
Sophisticated end user: include engineers, scientists, business
analysts who try to learn most of the DBMS facilities in order
to achieve their complex requirements.
Sophisticated users try to learn most of the
DBMS facilities in order to achieve their
complex requirements.
Stand alone users: maintain personal database
by using ready-made program packages that
provide easy-to use-menu-based or graphical-
based interfaces.
• Standalone users typically become very
proficient in using a specific software package.
31
Thank you
32