Lecture 2
Lecture 2
DATABASE MANAGEMENT
SYSTEMS
Lecture 2 Data is everywhere lets manage it!
Objectives
Some common uses of database systems.
Characteristics of file-based systems.
Problems with file-based approach.
Meaning of the term database.
Meaning of the term Database Management
System (DBMS).
Objectives
Typical functions of a DBMS.
Major components of the DBMS environment.
Personnel involved in the DBMS environment.
Advantages and disadvantages of DBMSs
DBMS Architectures
Last lecture Review
Separation and isolation of data
Duplication of data
Data dependence
Incompatible file formats
Fixed Queries/Proliferation of application
programs
Needs for DBMS
Arose because:
Definition of data was embedded in application programs,
rather than being stored separately and independently.
No control over access and manipulation of data beyond that
imposed by application programs.
Result:
the database and Database Management System (DBMS).
So Here comes Database!
A database is a collection of related data.
The Database Management System (DBMS) is the
software that manages and controls access to the
database.
A database application is a program that interacts with
the database at some point of its execution.
The database system is a collection of application
programs that interact with the database along with the
DBMS and the database itself.
Solution of File based system
The database and the Database Management System
(DBMS) were developed to overcome these limitations.
DEFN: The database is a shared collection of logically
related data, and a description of this data, designed
to meet the information needs of an organisation.
The database is a single, possibly large, repository of data
that can be used simultaneously by many departments and
users, All data items are integrated with a minimum amount
of duplication.
Database
The database is a shared corporate resource.
The database holds not only the organisation’s
operational data but also a description of the data.
For this reason, a database is also defined as a self
describing collection of integrated records.
The description of the data is known as the system catalog
(or data dictionary or metadata – the `data about the
data’). It is the self-describing nature of a database that
provides program-data independence.
Database
The database approach separates data and program
structure
If the new data structures are added or existing structures
are modified then the application programs are
unaffected, provided they do not directly depend upon
what has been modified.
If we add a new field or record or create a new file, existing
applications are unaffected.
If we remove a field from a file that an application program
uses, then that application program is affected by this change
and must be modified accordingly.
Some Definitions
An entity is a distinct object (a Person, place,
thing, concept, or event) in the organisation that is
to represented in the database.
An attribute is a property that describes some
aspect of the object that we wish to record.
A relationship is an association between entities.
Logically Related data???
The database represents the entities, the attributes,
and the logical relationships between the entities.
That is, the database holds data that is logically
related.
Database Management System
DEFN: The Database Management System (DBMS)
is a software system that enables users to define,
create, maintain, and control access to the
database.
The DBMS is the software that interacts using DDL
And DML with the users’ application programs and
the database.
Data Definition language
A DBMS usually provides the following facilities
Itallows users to define the database, usually through
a Data Definition Language (DDL). The DDL allows
users to specify the data types and structures and the
constraints on the data to be stored in the database.
Data manipulation language
It allows users to insert, update, delete, and retrieve
data from the database, usually through a Data
Manipulation Language (DML). Having a central
repository for all data and data descriptions allows the
DML to provide a general inquiry facility to this data,
called a query language. The most common query
language is the Structured Query Language (SQL).
DBMS
It provides access to the database.
A security system which prevents unauthorized users accessing the
database;
An integrity system which maintains consistency of stored data;
A concurrency system which allows shared access to the
database;
A recovery system which restores the database to a previous
consistent state following a hardware or software failure;
A user-accessible catalogue which contains descriptions of the
data in the database.
DBMS
Supports efficient access to very large amounts of
data.
Supports concurrent access to very large amounts
of data.
Example: bank and its ATM machines
DBMS
Application Program
DEFN: The Application Program is a computer program
that interacts with the database by issuing an appropriate
request (typically an SQL statement) to the DBMS.
Users interact with the database through a number of
application programs that are used to create and maintain
the database and to generate information. The application
programs may be written in some programming language or
in some higher-level fourth-generation language.
Components of the DBMS
Environment
There are five major components: hardware,
software, data, procedures, and people.
Hardware
Needed for DBMS and the applications to run on.
Can range from a single personal computer, to a single
mainframe, to a network of computers.
Depends on the organization’s requirements and the DBMS used.
A DBMS requires a minimum amount of main memory and disk
space to run, but this minimum may not give acceptable
performance.
The frontend is the part of the DBMS that interfaces with the
user. This is called client-server architecture: the backend is the
server and the frontends are the clients.
Software
Made up of DBMS software and the application
programs, together with operating system, including
network software if the DBMS is being used over a
network.
Application programs may be written using a
fourth-generation language like SQL embedded in
a third generation language
Data
From the end-users’ point of view data is the most
important component of the DBMS environment.
Data is the bridge between the machine components
and human components.
The database contains both the operational data and
the metadata (“data about data”).
The structure of the database is called the schema.
Procedures
Procedures are instructions and rules that govern the design and use
of the database.
Documented procedures on how to run the system are required by
the users of the system and the staff that manage the database.
Procedures may consist of instructions on how to:
log on to the DBMS;
use a particular DBMS facility or application program;
start and stop the DBMS;
change the structure of a table.
People
There are four distinct types of people:
Data and database administrators,
Database designers,
Application developers,
End-users.
Data and Database Administrators
They deal with the management and control of a DBMS and its data.
The Data Administrator (DA) is responsible for the management of
the data resource including
database planning,
development and maintenance of standards,
policies and procedures,
and conceptual/logical database design.
This person consults with and advises senior managers so that the
database development will support corporate objectives.
DBA
The Database Administrator (DBA) is responsible for the
physical realization of the database,
including physical database design and implementation,
security and integrity control, maintenance of the
operational system,
ensuring satisfactory performance of the application for
users.
Some organizations have one person performing both
roles.
Database Designers
Large database design projects have two types of
designer
Logical database designer: identifies the data (the
entities and attributes), the relationships between the
data, and the constraints on the data that is to be
stored in the database.
Physical database designer: decides how the logical
database design is to be physically realized.
Application Programmers
People who implement the application programs that
provide the required functionality for the end-users.
Usually application developers work from a
specification produced by systems analysts.
Each program contains statements that request the
DBMS to perform some operations on the database
including retrieving data, inserting, updating, and
deleting data.
End Users
End-users are the “clients” for the database, which has been designed and
implemented, and is being maintained to serve their information needs.
End-users can be classified according to the way they use the database
system:
Naïve users: access database through specially written application
programs that attempt to make the operations as simple as possible.
Sophisticated users: knows the structure of the database and facilities
offered by the DBMS. May use a high-level query language like SQL to
perform the required operations or may even write application programs
for their own use.
Advantages of DBMSs
Control of data redundancy
Data consistency
More information from the same amount of data
Sharing of data
Improved data integrity
Improved security
Enforcement of standards
Economy of scale
Advantages of DBMSs
Balance of conflicting requirements
Improved data accessibility and responsiveness
Increased productivity
Improved maintenance through data independence
Increased concurrency
Improved backup and recovery services
Disadvantages of DBMSs
Complexity
Size
Cost of DBMSs
Additional hardware costs
Cost of conversion
Performance
High impact of failure
Functions of DBMS
Data Storage, Retrieval, and Update.
A User-Accessible Catalog.
Transaction Support.
Concurrency Control Services.
Recovery Services.
Authorization Services.
Support for Data Communication.
Integrity Services.
Services to Promote Data Independence.
Utility Services.
System Catalog
Repository of information (metadata) describing the
data in the database.
One of the fundamental components of DBMS.
Typically stores:
names, types, and sizes of data items;
constraints on the data;
names of authorized users;
data items accessible by a user and the type of access;
usage statistics.
Components of a DBMS
36
Components of Database Manager
(DM)
37
Multi-User DBMS Architectures
38
Teleprocessing
File-server
Client-server
Teleprocessing
Traditional architecture.
Single mainframe with a number of terminals
attached.
Trend is now towards downsizing.
39
File-Server
40
Advantages:
‘Thin’ client, requiring less expensive hardware.
Application maintenance centralized.
Easier to modify or replace one tier without affecting
others.
Separating business logic from database functions makes it
easier to implement load balancing.
Maps quite naturally to Web environment.
Three-Tier Client-Server
47
Any question!
See you in Next Class !