Vous êtes sur la page 1sur 60

Database

Systems

CHAPTER 1
Contents

Why database?
Data vs Information
Introducing the database
Types of databases
Why database design is important
Evolution of file system data
processing
Database systems
Why database?

Good decisions require good


information derived from raw facts
Data managed most efficiently when stored
in a database
Databases evolved from computer file
systems
Understanding file system characteristics is
important
Data vs. Information
4

Data are raw facts


Data are the foundation of information, which is
the bedrock of knowledge
Information is the result of processing raw
data to reveal meaning
Information requires context to reveal meaning
Raw data must be formatted for storage,
processing, and presentation
Accurate, relevant, timely information is the
key to good decision making
Good decision making is the key to
organizational survival
Database

A shared, integrated computer structure


that stores end user data and Metadata.

End user data


raw facts of interest to the end user

Metadata
data about data
provide a description of the data
characteristics and the set of relationships
that link the data found within the database.
Metadata
DBMS (Database
Management System)
Collection of programs that manages
database structure and controls access
to data
Makes data management more efficient
and effective
Datamanagement:
the process of managing data for proper
generation, storage and retrieval.

Possible to share data among multiple


applications or users
Role of DBMS
Advantages of DBMS

1. Improved data sharing


2. Improved data security
3. Better data integration
4. Minimize data inconsistency
5. Improved data access
6. Improved decision making
7. Increased end-user productivity
Types of Databases

Databases can be classified into 3 types


according to:

1. the number of users


2. the database location
3. the extent of use
Types of Databases

1.Classified by the number of users


Single-user:
Supports only one user at a time
Desktop:
Single-user database running on a personal computer
Multi-user:
Supports multiple users at the same time
Workgroup:
Multi-user database that supports a small group of

users or a single department (<50)


Enterprise:
Multi-user database that supports a large group of

users or an entire organization (>50 usually hundreds)


Types of Databases

2.Classified by the database location


Centralized:
Supports data located at a single site
Distributed:
Supports data distributed across several sites

3.Classified by use:
Transactional (or production):
Supports a companys day-to-day operations
Data warehouse:
Stores data used to generate information required to make
tactical or strategic decisions
Often used to store historical data
Structure is quite different
Types of Databases
Single- Deskto
Numbe
user p
r of
users Multi- Workgr
user oup
Centrali Enterpr
Databa zed ise
Databa se
se locatio Distribu
n ted
Operation
al/
Transacti
onal/
Extent Productio
of use n
Data
Wareho
use
Types of Databases (continued)
14

Unstructured data exist in their original


state
Structured data result from formatting
Structure applied based on type of processing
to be performed
Semistructured data have been
processed to some extent
Extensible Markup Language (XML)
represents data elements in textual format
XML database supports semistructured
XML data
Database design
Database design:
Refers to the activities that focus on the
design of the database structure that
will be used to store and manage end-
user data.
Why Database Design is
Important
Defines the databases expected use
Avoid redundant data (unnecessarily
duplicated)
Poorly designed database generates
errors leads to bad decisions can
lead to failure of organization
Well designed database facilitates data
management and generates accurate
and valuable information.
Evolution of File System
Data Processing
Manual File System (File)

Collection of file folders kept in


file cabinet

Arrangement within folders based


on datas expected use (logically
related)

System adequate for small


amounts of data with few
reporting requirements

Finding and using data in growing


collections of file folders became
time-consuming and
Computerized File System

File System:
A collection of application programs that
perform services to the end-users, such as
the production of reports. Each program
defines and manages its own data.
Early attempt to computerize the manual filing
system
File system was developed in response to the
needs of industry for more efficient data access
Decentralized approach was taken.
Each department stored and controlled its own
data assisted by Data Processing(DP) staff
Computerized File System

DP (Data Processing) specialists


create computer file structures
wrote software to manage data and
designed the application programs to produce
reports
Basic File Terminology
Example of File Systems
Implementation
Case:
A company that manage renting and selling of
properties

Sales Department :
responsible for selling and renting of properties

Contracts Department :
responsible for handling lease agreement related to properties for rent
Example of File Systems
Implementation
DreamHome
Property for Rent Details
Client offer property for rent Property Number: PG21
Address B10 Jalan Teratai Allocated to Branch
Kuala Terengganu
Approach sales department City Kuala Terengganu Branch No. B003
Fill in a form Postcode 20050

Type House Rent Staff Responsible


600 Asyraf Hisyam
No. of Rooms 5

Owners Details
Name Zaharah Muhd Business Name
Address No.1 Jln Address
Sutera
Kuala Terengganu

Tel. No. 019- Tel. No.


9124567
Owner No. C087 Owner No.
Contact Name

Business Type
Example of File Systems
Implementation
DreamHome
Client inquire property to rent Client Details
Client Number: CR74
Approach sales department First Name Che Ku Affandi Last Name
Che Ku Yahya
Fill in a form Address 1129 Tanah Lot Saujana
Setiu
Property Requirement Details
Preferred Property Maximum Monthly Rent
Type 750
House
General Comments Currently living with parents
Getting married in August
Office
Seen By Aisyah Date 24/3/09
Halim
Branch No. B003 Branch City Kuala Terengganu
Example of File Systems
Implementation
PropertyForRent Sales
property street city postco type rooms rent owner
No de No
PG21 B10 Jalan Kuala 20050 house 5 600 C087
Teratai Terengga
nu
PG16 No 5 Kemama 20560 flat 3 350 C026
PrivateOwner
Persiaran n
ownerNo 7 fName lName address telNo
C040 Yin Chung Long Flat Sri Kolam, KT 09-6224223
C026 Hamid Gurkha Jln.Masjid Puteh, KT 013-9134589
C087 Zaharah Muhd No1 Jalan Sutera, 019-912467
KT

Client
client fNam lName address telNo prefTy maxRe
No e pe nt
CR74 Che Ku Che Ku 1129 Tanah Lot 019-5654111 house RM750
Affandi Yahya Saujana, Setiu
CR56 Hapsa Wahab No 2 Taman 013-7654330 flat RM300
h Setia, Dungun
CR67 Tg.Dini Tg.Syukri Jln Dahlia, KT 09-6224017 bungalo RM1000
Example of File Systems
Implementation
DreamHome
Client agrees to rent a property Lease Details
Lease Number: 10012
Sales staff fill in a form Client No. CR74 Property No. PG21

Form then is passed to the Full Name Che Ku Affandi Che


Ku Yahya
Address B10 Jalan
Teratai , Kuala Terengganu
Contracts department Address (previous) 1129
Tanah Lot Saujana, Setiu

Tel.No 019-5654111

Payment Details

Monthly Rent RM600 Rent Start Date 1/7/09

Payment Method Cash Rent Finsh Date 30/6/10

Deposit 1200 Paid Duration 1 Year


(Y or N) Y
Example of File Systems
Implementation
Contracts
Lease
leaseN property clien rent payme deposit pai rentSt rentFin durati
o No tNo ntMet d art ish on
hod
10024 PG16 CR5 RM350 Visa RM700 Y 1/8/09 31/7/10 12
6
10012 PG21 CR7 RM600 Cash RM1200 Y 1/7/09 30/6/10 12
PropertyForRent 4
propertyNo street city postcod rent
e
PG21 B10 Jalan Teratai Kuala Terengganu 20050 RM600
PG16 No 5 Persiaran 7 Kemaman 20560 RM350
Client
clientNo fName lName address telNo
CR74 Che Ku Che Ku 1129 Tanah Lot Saujana, 019-5654111
Affandi Yahya Setiu
CR56 Hapsah Wahab No 2 Taman Setia, Dungun 013-7654330
CR67 Tg.Dini Tg.Syukri Jln Dahlia, KT 09-6224017
Example of File Systems
Implementation
File System Processing - Decentralized

Data File handling


entry and routines
reports File definition
Sales application programs
Sales Sales Files

Data File handling


entry and routines
reports File definition
Contracts application programs Contracts Files
Contracts
File System
As number of data file increased, small
file system evolved

Each file was owned by individual or


department who commissioned its
creation

Each file used its own application


programs to store, retrieve and modify
data
Problems with File System Data
Management

Problems with File System


1 Requires extensive programming
2 Cannot perform ad-hoc queries
System administration can be complex and difficult
3
It is difficult to make changes to existing file
4 structure
Data dependence
Structural dependence
5 Security features are likely to be inadequate
6 Isolation of data

7 Data redundancy (duplication of data)


8 Data anomaly
Problems with File System Data
Management
Requires extensive programming
Time-consuming, high-level activity
Cannot perform ad-hoc queries
Need to write programs to produce even the simplest
record
System administration can be complex and
difficult
System administration be more complex as the number of
files expands
It is difficult to make changes to existing file
structure
File structure changes require modifications in all
programs that use data in that file
Security features are likely to be inadequate
Problems with File System Data
Management

Structural dependence
Access to a file depends on its structure
Changes in the file structure such as
adding or deleting fields requires
modification of all programs using that file
e.g. adding customer date-of-birth field to
CUSTOMER file require changes in all
application programs using data from that
file
Problems with File System Data
Management

Data dependence
Changes in the data storage
characteristics affects the application
programs ability to access the data
e.g. changing field type from integer to
decimal, requires changes in all the
programs that access the file.
Isolation of Data
Because data are scattered in various
files, and files may be in different
formats, it is difficult to write new
application programs to retrieve the
appropriate data.
Data Redundancy

The same data are stored unnecessarily at


different places
Data redundancy results in data inconsistency
Different and conflicting versions of the same data
appear in different places

Data inconsistency data that lack data


integrity

Data anomalies develop when required changes


in redundant data are not made successfully
Data Anomalies

Anomaly = Abnormality
Abnormal condition occur due to data
redundancy that force field value changes in
many different locations
Types of data anomalies:
Update (Modification) anomalies

Occur when changes must be made to existing


records
Insertion anomalies

Occur when entering new records


Deletion anomalies

Occur when deleting records


Database Systems
Database Systems
Problems inherent in file systems make
using a database system desirable

File system
Many separate and unrelated files

Database
Logically related data stored in a single
logical data repository
Database Systems
The Database System
Environment
Database system is composed of five
main parts:
Hardware
Software
Operating system software
DBMS software
Application programs and utility software
People
Procedures
Data
The Database System
Environment
The Database System Environment
(continued)
44

Hardware: all the systems physical devices


Software: three types of software required:
Operating system software
DBMS software
Application programs and utility software
People: all users of the database system:
System and database administrators
Database designers
Systems analysts and programmers
End users
The Database System Environment
(continued)
45

Procedures: instructions and rules that


govern the design and use of the database
system
Data: the collection of facts stored in the
database
Database systems created and managed at
different levels of complexity
Database solutions must be cost-effective as
well as tactically and strategically effective
Database technology already in use affects
selection of a database system
DBMS Functions
46

Most functions transparent to end users


Can only be achieved through the DBMS
Data dictionary management
DBMS stores definitions of data elements and
relationships (metadata) in a data dictionary
DBMS looks up required data component
structures and relationships
Changes automatically recorded in the
dictionary
DBMS provides data abstraction, removes
structural and data dependency
DBMS Functions
48
(continued)
Data storage management
DBMS creates and manages complex
structures required for data storage
Also stores related data entry forms, screen
definitions, report definitions, etc.
Performance tuning: activities that make
the database perform more efficiently
DBMS stores the database in multiple
physical data files
DBMS Functions
50
(continued)
Data transformation and presentation
DBMS transforms data entered to conform to
required data structures
DBMS transforms physically retrieved data to
conform to users logical expectations
Security management
DBMS creates a security system that enforces
user security and data privacy
Security rules determine which users can access
the database, which items can be accessed, etc.
DBMS Functions
51
(continued)
Multiuser access control
DBMS uses sophisticated algorithms to
ensure concurrent access does not affect
integrity
Backup and recovery management
DBMS provides backup and data recovery
to ensure data safety and integrity
Recovery management deals with recovery
of database after a failure
Critical to preserving databases integrity
DBMS Functions
52
(continued)
Data integrity management
DBMS promotes and enforces integrity rules
Minimizesredundancy
Maximizes consistency

Data relationships stored in data dictionary


used to enforce data integrity
Integrity especially important in
transaction-oriented database systems
DBMS Functions
53
(continued)
Database access languages and
application programming interfaces
DBMS provides access through a query
language
Query language is a nonprocedural
language
Structured Query Language (SQL) is
the de facto query language
Standard supported by majority of DBMS
vendors
DBMS Functions
54
(continued)
Database communication interfaces
Current DBMSs accept end-user requests via
multiple different network environments
Communications accomplished in several
ways:
End users generate answers to queries by filling
in screen forms through Web browser
DBMS automatically publishes predefined
reports on a Web site
DBMS connects to third-party systems to
distribute information via e-mail
Managing the Database System:
A Shift in Focus
55

Database system provides a framework in


which strict procedures and standards
enforced
Role of human changes from programming to
managing organizations resources
Database system enables more
sophisticated use of the data
Data structures created within the
database and their relationships determine
effectiveness
Database Systems, 8th Edition
Managing the Database System:
A Shift in Focus (continued)
56

Disadvantages of database systems:


Increased costs
Management complexity
Maintaining currency
Vendor dependence
Frequent upgrade/replacement cycles
Summary

Data are raw facts


Information is the result of processing data to
reveal its meaning
Accurate, relevant, timely information is the
key to good decision making
Data usually stored in a database
DBMS implements a database and manages its
contents
Summary

Metadata is data about data


Database design defines the database
structure
Databases evolved from manual and
computerized file systems
In a file system, data stored in independent
files
Each requires its own management
program
Summary
Some limitations of file system data
management:
Requires extensive programming
System administration complex and difficult
Changing existing structures difficult
Security features likely inadequate
Independent files tend to contain
redundant data
Structural and data dependency problems
Summary
Database management systems developed to
address file systems inherent weaknesses
DBMS present database to end user as single
repository
Promotes data sharing

Eliminates islands of information

DBMS enforces data integrity, eliminates


redundancy, promotes security

Vous aimerez peut-être aussi