Sei sulla pagina 1di 35

F4109 – DATABASE SYSTEM

UNIT 1
DATABASE SYSTEM
INTRODUCTION TO DATABASE

PART 1
File-Based Systems

• Collection of application programs that


perform services for the end users.

• Each program defines and manages its own


data.

prepared by: nurizah@ict.puo.edu.my


File-Based Processing

prepared by: nurizah@ict.puo.edu.my


Limitations of File-Based
Approach
• Separation and isolation of data
– Each program maintains its own set of data.
– Users of one program may be unaware of potentially
useful data held by other programs.

• Duplication of data
– Same data is held by different programs.
– Wasted space and potentially different values and/or
different formats for the same item.

prepared by: nurizah@ict.puo.edu.my


Limitations of File-Based
Approach
• Data dependence
– File structure is defined in the program code.

• Incompatible file formats


– Programs are written in different languages, and so cannot easily
access each other’s files.

• Fixed Queries/Proliferation of application programs


– Programs are written to satisfy particular functions.
– Any new requirement needs a new program.

prepared by: nurizah@ict.puo.edu.my


Database Approach

• 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).

prepared by: nurizah@ict.puo.edu.my


Database

• Shared collection of logically related data (and a


description of this data), designed to meet the
information needs of an organization.

• System catalogue (metadata) provides description of


data to enable program–data independence.

• Logically related data comprises entities, attributes,


and relationships of an organization’s information.

prepared by: nurizah@ict.puo.edu.my


Database Management System
(DBMS)
• A software system that enables users to
define, create, and maintain the database
and that provides controlled access to this
database.

prepared by: nurizah@ict.puo.edu.my


Database Management System
(DBMS)

prepared by: nurizah@ict.puo.edu.my


Database Approach

• Data definition language (DDL).


– Permits specification of data types, structures and any
data constraints.
– All specifications are stored in the database.

• Data manipulation language (DML).


– General enquiry facility (query language) of the data.

prepared by: nurizah@ict.puo.edu.my


Database Approach

• Controlled access to database may include:


– A security system.
– An integrity system.
– A concurrency control system.
– A recovery control system.
– A user-accessible catalogue.

• A view mechanism.
– Provides users with only the data they want or need to
use.

prepared by: nurizah@ict.puo.edu.my


Components of DBMS
Environment

prepared by: nurizah@ict.puo.edu.my


Components of DBMS
Environment
Hardware Can range from a PC to a network of computers.

DBMS, operating system, network software (if necessary) and


Software

also the application programs.

Used by the organization and a description of this data


Data

called the schema.

Instructions and rules that should be applied to the design


Procedures

and use of the database and DBMS.

People Human who used or deal with the database system


prepared by: nurizah@ict.puo.edu.my


Roles in the Database
Environment
• Data Administrator (DA)
• Database Administrator (DBA)
• Database Designers (Logical and Physical)
• Application Programmers
• End Users (naive and sophisticated)

prepared by: nurizah@ict.puo.edu.my


History of Database Systems

FIRST SECOND THIRD


GENERATI GENERATI GENARATI
ON ON ON

Hierarch
ical

Relati ●
Obj Relational

Obj Oriented

Network onal
prepared by: nurizah@ict.puo.edu.my
Hierarchical Database Model

• Logically represented by an upside down tree


– Each parent can have many children
– Each child has only one parent

prepared by: nurizah@ict.puo.edu.my


Hierarchical Database Model

ADVANT ●


Conceptual simplicity
Database security and integrity
Data independence

AGES Efficiency

DISADVA ●


Complex implementation
Difficult to manage and lack of standards
Lacks structural independence

Applications programming and use complexity

NTAGES ●
Implementation limitations (no M:N relationship)

prepared by: nurizah@ict.puo.edu.my


Network Database Model

Network schema (database organization)

Subschema (views of database per user)

Data management language

Identified 3 database component


prepared by: nurizah@ict.puo.edu.my
Network Database Model
• Each record can have multiple parents
– Composed of sets - relationships
– Each set has owner record and member record
– Member may have several owners
– A set represents a 1:M relationship between the owner
and the member

prepared by: nurizah@ict.puo.edu.my


Network Database Model

Conceptu
ADVANTAGES

DISADVANTAGES
Syste
al
simplicity m
Handles compl
more
relations
exity
hip types Lack of
Data struct
access
flexibility
ural
Promotes indepe
database ndenc
integrity
Data e
independ
ence
Conform
ance to
standard
s

prepared by: nurizah@ict.puo.edu.my


Relational Database Model

• Perceived by user as a collection of tables for


data storage
• Tables are a series of row/column
intersections (a row corresponds to a record, a
column to a field)
• Tables related by sharing common entity
characteristic(s)
• RDBMS
prepared by: nurizah@ict.puo.edu.my
Relational Database Model

prepared by: nurizah@ict.puo.edu.my


Relational Database Model

ADVANTAGES DISADVANTAGES

Structural independence Substantial hardware and


system software overhead
Improved conceptual simplicity

Easier database design, implementation, Poor design and


management, and use implementation is made easy

Ad hoc query capability with SQL


May promote “islands of
Powerful database management system information” problems

prepared by: nurizah@ict.puo.edu.my


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

prepared by: nurizah@ict.puo.edu.my


ADVANTAGES OF DBMSs

• Balanced conflicting requirements


• Improved data accessibility and
responsiveness
• Increased productivity
• Improved maintenance through data
independence
• Increased concurrency
• Improved backup and recovery services

prepared by: nurizah@ict.puo.edu.my


DISADVANTAGES OF DBMSs

• Complexity
• Size
• Cost of DBMS
• Additional hardware costs
• Cost of conversion
• Performance
• Higher impact of a failure

prepared by: nurizah@ict.puo.edu.my


DATABASE ENVIRONMENT

PART 2
Objectives of Three-Level
Architecture
All users should
1 2 A user’s
3 view is
be able to access immune to changes
same data. made in other views

Users should not DBA should be able to


need to know change database storage
physical database
4
structures
5
without 6
storage details affecting the users’ views
prepared by: nurizah@ict.puo.edu.my
ANSI-SPARC
Three-Level Architecture

prepared by: nurizah@ict.puo.edu.my


ANSI-SPARC
Three-Level Architecture

EXTERNAL CONCEPTUAL INTERNAL


Users’ view of Community view Physical
the database of the database representation
Describes that Describes what of the database
part of database data is stored in on the computer
that is relevant database and Describes how
to a particular relationships the data is stored
user among the data in the database

prepared by: nurizah@ict.puo.edu.my


Differences between Three Levels
of ANSI-SPARC Architecture

prepared by: nurizah@ict.puo.edu.my


Data Independence

Refers to Refers to

PHYSICAL
LOGICAL

immunity immunity
of external of
schemas conceptual
to changes schema to
in changes in
conceptual the
schema internal
Conceptua schema.
l schema Internal
changes schema
(e.g. changes
(e.g. using
addition/r
different
emoval of
file
entities)
organizatio
Should not
ns, storage
require structures/
changes to devices).
external Should not
schema or require
rewrites of change to
application conceptual
programs or external
schemas.
prepared by: nurizah@ict.puo.edu.my
Data Independence and the ANSI-SPARC
Three-Level Architecture

prepared by: nurizah@ict.puo.edu.my


Database Languages

NONPRO-
DDL DML PRO-DML 4 GL
DML


Description ●
Query
language
Languages

Define or ●
Provides ●
allows user ●
allows user ●
Forms
modify the basic data to tell to state
Generators
schema not manipulatio system what data is ●
Report
manipulate n operations exactly how needed
Generators
data on data held to rather than ●
Graphics

associated in the manipulate how it is to
Generators
integrity and database data be retrieved ●
Application
security
Generators
constraints prepared by: nurizah@ict.puo.edu.my

Potrebbero piacerti anche