Transcript ppt - DUET
Introduction to
Database Management
Systems
Lila Rao Graham
1
Motivation
Organisations are increasingly aware of the
importance of information in the solution of
their problems.
Because of decreasing cost of data storage,
organisations store increasing quantities of
data.
This data must be managed in the most
efficient and effective manner.
2
The Database Approach
Organizations must have access to
operational data that is
accurate
timely
convenient
up-to-date
secure but available
As control decentralizes in an organization,
there is a danger that data management
decentralizes as well.
3
Dangers of Decentralized Data
Management
Redundancy
Inconsistency
Incompatibility
Different formats
Different constraints
Different models of the data
Inaccuracy
Insecurity
Non-accountability
Inflexibility
4
Integration and Sharing
Data should be
integrated
the database can be regarded as a unification of
several otherwise distinct data files
shared
individual pieces of data in the database can be
shared among several different users
5
Data Management
Objective
Model a part of the world of the real world
accurately and efficiently to give user useful
data
Requirements
Flexibility
Accuracy
Reliability
Accessibility
Efficiency
6
Data Modelling: Abstraction Again
Abstraction:
In modelling the data, we again use
abstraction. We hide (irrelevant) detail and
concentrate on the general and common
attributes of a set of objects
Example:
Real world:
Student
Model:
ST(id, name, dob, grade history)
7
Definition of a Database
A database (DB) is a collection of interrelated
computer files, whose data contents and
structure are described in a data dictionary
and which is under the control of a database
management system (DBMS)
8
Database Management Systems
A database management system is a
collection of programs that carry out activities
on a database, including
setting up storage structures
loading data
accepting and performing updates
accepting data requests from users and
programs.
9
Functions of a DBMS
A good DBMS performs the following
functions
maintain data dictionary
support multiple views of data
enforce integrity constraints
enforce access constraints
support concurrency control
support backup and recovery procedures
support logical transactions
10
Advantages of Using a DBMS
All applications access a common DB. So,
details related to data storage and access
are removed from programs and users.
Hence
less redundancy
less risk of inconsistency
maintenance of data integrity
application of access restrictions
balance between different requirements
data independence
11
Layered Structure of a Database
We can regard a database as having a
layered structure
-----------------------------External Schema
----------------------------------------------------------Conceptual Schema
----------------------------------------------------------Internal Schema
------------------------------
12
Schemas and Instances
A schema is the overall design of the
database. It describes the data contents,
structure and some other aspects of the
database also called the intension of the
database
The instance is the collection of data stored in
the database at a particular time, also called
the extension of the database.
13
Data Independence:
External schema
Different users often need different views of
the data.
Example:
Bursar needs to have access to financial
information on a student
Head of Department needs access to
academic information.
An external schema is a description of part of
the DB as seen by an application
programmer or a user
14
Conceptual Schema
Representation of the logical structure of the
information content of the DB.
Abstracts away from the actual physical
storage.
The data “as it really is”.
It is, in a sense, a composite of all the
external schemata.
15
Internal Schema
The internal schema describes the data as it
is physically stored.
For example,
record structure
types of fields in a record
existence of primary and secondary indexes
16
Data Independence
Higher levels should be immune to changes
at the lower level.
Physical data independence:
changes at the internal schema (e.g., changes
in record structure or indexes) do not affect
the conceptual schema
Logical data independence
changes at the conceptual schema (e.g.,
addition of further fields in a record) do not
affect the external schema.
17
Importance of Data Independence
Similarity between data independence and
the use of abstract data types.
Immunity to lower-level implementation
details.
Possibility of adding new applications without
having to restructure the data base.
18