Chapter 1- Introduction to Database Systems
Chapter 1- Introduction to Database Systems
Chapter 1: Introduction
Outlines
Introduction to Database
Data management approach
Components of DBMS
Functions of DBMS
Database Development Lifecycle
Roles in Database Design environment
Database Architecture
Database Language
Data models
2
Database
Database is a shared collection of logically related
data, and a description of this data, designed to
meet the information needs of an organization.
• Shared collection: database is integrated with minimum
amount of or no duplication.
• Logically related: data comprises entities, attributes,
relationships, and business rules of an organization's
information.
• Description of Data: database also contains a description
of the data which called as “Metadata” or “Data
Dictionary” or “Systems Catalogue” or “Data about
Data”.
3
Database system
It is a system which has the following components
Database
Database management system
DBMS is a software that enables users to define, create,
maintain and control access to the database.
Hardware
People having roles to play in the database environment and
Some application programs
4
Database system: Overview
Assuming INJIBARA UNIVERSITY uses a Database
system to handle student records how do:
Students register for courses?
Instructors enter grades?
Students get information on their academic performance?
Queries are processed?
5
Cont’d
Database and Database systems have become an essential
component of everyday life in modern society.
Databases play a critical role in almost all areas where
computers are used.
Some examples
Depositing or withdrawing money from a bank
Making airline reservation
Accessing a computerized library catalog to search for books
Purchasing an item from a supermarket
Booking a holiday at the travel agent
Purchasing using your credit card
Using the Internet
All these may involve accessing databases
6
Database Applications
Banking: all transactions
Airlines: reservations, schedules
Universities: registration, grades
Sales: customers, products, Inventory, orders, supply chain
Human Resources: employee records, salaries, tax deductions
Databases touch all aspects of our lives
7
Data Management Approach
Data management passes through the different levels of
development.
These levels could best be described by categorizing the
levels into three levels of development:
Manual Approach
Traditional File Based Approach
Database Approach
8
Cont’d
Manual Approach:
Cards and Paper are used for the purpose of
data storage and retrieval.
Each files containing various kinds of
information is labelled and stored in one or
more cabinets.
Insertion and retrieval is done by searching
first for the right cabinet then for the right the
file then the information.
9
Cont’d
Limitation of Manual Approach:
Prone to error
Difficult to update, retrieve, integrate
You have the data but it is difficult to compile
the information
Limited to small size information
Cross referencing is difficult
10
Cont’d
12
Cont’d
Limitations of File-Based systems
Data Redundancy (Duplication of data)
Same data is held by different programs
Wasted space (Uncontrolled duplication of data)
13
Cont’d
14
Cont’d
15
Cont’d
Update Anomalies
16
Cont’d
File based approaches
17
Cont’d
Database approach:
The database approach was taken to overcome the
limitations of file based systems.
In this approach
A database is maintained.
A DBMS provides all the required services.
Note: A DBMS is a software system that enables users to define,
create, maintain, and control access to the database. More on this
in the next chapter.
18
Cont’d
Example: Database Management System
19
Cont’d
Benefits of Database systems
Data can be shared: two or more users can access and
use same data instead of storing data in redundant manner
for each user
Improved data accessibility: By using structured query
languages, the users can easily access data without
programming experience.
Redundancy can be reduced: Isolated data is integrated
in database to decrease the redundant data stored at
different applications.
20
Cont’d
Quality data can be maintained: the different integrity
constraints in the database approach will maintain the quality
leading to better decision making.
21
Cont’d
Security measures can be enforced: the shared data
can be secured by having different levels of clearance and
other data security mechanisms.
22
Cont’d
23
Cont’d
24
Components of DBMS
DBMS is a software system that enables users to define,
create, and maintain the database and that provides
controlled access to this database.
25
Cont’d
Hardware
Can range from a PC to a network of computers.
Software
DBMS, operating system, network software (if necessary) and also
the application programs.
Data
Used by the organization and a description of this data called the
schema.
Procedures
Instructions and rules that should be applied to the design
and use of the database and DBMS.
People
Includes database designers, DBAs, application
programmers, and end-users.
26
Cont’d
Query processor
A major DBMS component that transforms queries into a series
of low-level instructions directed to the database manager.
Database manager
The DM interfaces with user-submitted application programs
and queries.
Accepts queries and examines the external and conceptual
schemas to determine what conceptual records are required to
satisfy the request. The DM then places a call to the file
manager to perform the request
File manager
The file manager manipulates the underlying storage files and
manages the allocation of storage space on disk.
27
Cont’d
DML pre-processor:
this module converts DML statements embedded in an
application program into standard function calls in the host
language.
The DML pre-processor must interact with the query
processor to generate the appropriate code.
DDL compiler
The DDL compiler converts DDL statements into a set of
tables containing meta-data.
Catalog manager
Manages access to and maintains the system catalog.
28
Functions of DBMS
Define a database: in terms of data types, structures
and constraints
Manipulate the database: querying, generating reports,
insertions, deletions and modifications to its content
Enforce Security measures : to prevent unauthorized
access
Provide Data Independence-Applications insulated
from how data is structured and stored
29
Cont’d
Enable the user to access database catalog
e.g.
names, types, and sizes of data items
names of relationships
Provide backup and recovery services
Enforce integrity constraints on the database
Changes on data of DB should follow certain rules
Provide other utility services
e.g. import and export facilities
Indexing
Provide transaction support
30
Database development Lifecycle
Planning: identifying information gap in an organization and
propose a database solution to solve the problem
Analysis: fact finding about the problem or the opportunity.
Feasibility analysis, requirement determination and structuring,
and selection of best design method
Design:
Conceptual Design: concise description of the data, data
type, relationship between data and constraints on the data.
There is no implementation or physical detail consideration.
Used to elicit and structure all information requirements
31
Cont’d
Logical Design: a higher level conceptual abstraction with
selected specific data model to implement the data structure.
Physical Design: physical implementation of the upper level
design of the database
Implementation: the testing and deployment of
the designed database for use.
Operation and Support: administering and
maintaining the operation of the database system and
providing support to users.
32
Roles of people in a Database Environment
Data administrator
Responsible for
Management of data resources
Database planning
Development of standards
Policies and procedures
Consulting users
33
Cont’d
Database Designers
Logical Designers
Concerned with identifying the data, entities and
attributes, relationships and constraints
Need a complete knowledge of the organization's data
and business rules
Physical Designers
Decide how the logical database designer is to be
physically realized
Map the logical database design into a set of tables
Select specific storage structures and access methods
Design security measures
34
Cont’d
Application Developers
Application programs provide the required functionality for
the end user.
Work based on the requirement specified by the system
analyst.
Each program contains statements that request the DBMS
to perform some operation on the database – retrieving,
inserting, updating and deleting data.
End Users
End users require access to the database for querying,
updating, and generating reports; the database primarily
exists for their use.
They are differentiated by the way they expect to
interact with the system.
35
Cont’d
Naive Users
Unaware of the DBMS and the DB
Depend on the simplicity of the GUI
(E.g.. Bank tellers, clerical staff)
Sophisticated Users
Familiar with the structure of the database and the
facilities of the DBMS
May use high-level query languages (SQL) to perform the
required operation
May even write application program for their own use
36
Database Architecture
The American National Standards Institute/
Standards Planning and Requirements Committee
(ANSI-SPARC) introduced the three level architecture
of the database based on their degree of abstraction.
37
Cont’d
Levels of Abstraction - (Three level ANSI_SPARC architecture )
38
Cont’d
External Level:
Users' view of the database.
Describes that part of database that is relevant to a particular user.
Different users have their own customized view of the database
independent of other users.
Conceptual level :
the community view of the database.
This level describes what data is stored in the database and the
relationships among the data.
Conceptual level is the middle level.
It is a complete view of the data requirements of the organization.
Any data available to a user must be contained in, or derivable from
conceptual level
39
Cont’d
Internal level :
the physical representation of the database on the
computer.
This level describes how the data is stored in the
database.
The internal level is concerned with such things as:
Storage space allocation for data
Record description for storage
Record placement
The way the DBMS and OS perceive the data is the
internal level.
40
41
Database languages
Data definition language (DDL)
Allow users to specify the data types and structures, and
the constraints on the data to be stored in the database
In other words, it is used to define the database schema
E.g. SQL DDL
Data manipulation language (DML)
DML is used for querying, inserting, deleting, and
updating database instances
E.g. SQL DML
Data Control Language(DCL)
DCL allow to control access to data within the database.
42
Data models
Definition
Integrated concept for describing data, relationship and
constraints
Types
Object-based data models
Record-based data models
Physical data models (internal structure, ordering, & paths)
43
Cont’d
Object-Based Data Models
Entity-relationship
Entity, attribute, relationship
Object-oriented
Object, class, subclass, inheritance, state (attributes),
behaviour (methods or actions), encapsulation, message,
polymorphism
44
Cont’d
Record-Based Data Models
Relational data model
Network model
Hierarchical Model
Physical Data Models
Describe how data is stored in the computer representing
information such as
Record structures
Record orderings and
Access paths
Most common physical data models are
Unifying model
Reading Assignment
Frame memory
45
Questions?
46