Database Systems: Design, Implementation, and Management

Download Report

Transcript Database Systems: Design, Implementation, and Management

1
Chapter 1
Database Systems
Database Systems: Design, Implementation, and
Management, Fifth Edition, Rob and Coronel
1
In this chapter, you will learn:
• The difference between data and information
• What a database is, about different types of
databases, and why they are valuable assets for
decision making
• The importance of database design
• How modern databases evolved from file systems
• How a database system differs from a file system
• The main functions of a database management
system (DBMS)
2
1
Data vs. Information
• Data:
– Raw facts; building blocks of information
– Unprocessed information
• Information:
– Data processed to reveal meaning
• Accurate, relevant, and timely information is key
to good decision making
• Good decision making is key to survival in global
environment
3
1
Transforming Raw Data into Information
4
1
Transforming Raw Data into Information
(continued)
5
1
Transforming Raw Data into Information
(continued)
6
1
Transforming Raw Data into Information
(continued)
7
1
Introducing the Database and the DBMS
• Database
is a shared, integrated computer structure that stores:
– End user data (raw facts)
– Metadata (data about data)
• Database Management System (DBMS) is a collection of programs that
– Manages Database structure
– Controls access to data
– Possible to share data among multiple applications or
users
– Makes data management more efficient and effective
8
1
DBMS
Makes Data Management More
Efficient and Effective
• Provides end users better access to more and bettermanaged data
• Promotes integrated view of organization’s operations -“big picture.”
• Reduces the probability of inconsistent data
• Query language allows quick answers to ad hoc queries
(spur-of-the-moment questions)
9
1
The DBMS Manages the Interaction Between
the End User and the Database
DBA
10
Types of Databases
1
• Single-user:
– Supports only one user at a time
• Desktop:
– Single-user database running on a PC
• Multi-user:
– Supports multiple users at the same time
• Workgroup:
– Multi-user database that supports a small group of
users or a single department
• Enterprise:
– Multi-user database that supports a large group of
users or an entire organization
11
1
Types of Databases
(classified by location)
• Centralized:
– Supports data located at a single site
• Distributed:
– Supports data distributed across several sites
12
1
Types of Databases
(classified by use)
• Transactional (or production):
– Supports a company’s day-to-day operations
• Data warehouse:
– Stores data used to generate information required
to make tactical or strategic decisions
• Such decisions typically require “data massaging”
– Often used to store historical data
– Structure is quite different
13
1
Why Database Design is Important
• Poor design results in unwanted data redundancy
(unnecessarily duplicated)
• Poor design generates errors
 leads to bad decisions
 can lead to failure of organization
14
1
The Historical Roots of Database:
Files and File Systems
• Although managing data through file systems is
largely obsolete
– simple characteristics of file systems →
makes complexity of database design easier to
understand
– prevent similar problems in DBMS
– helpful for converting an obsolete file system to a DBMS
15
1
Manual File Systems
• Collection of file folders kept in file cabinet
• Organization within folders was based on data’s
expected use (ideally logically related)
• System was adequate for small amounts of data
• Finding and using data - time-consuming and
cumbersome
16
1
Conversion from Manual File System
to Computer File System
• Could be technically complex, requiring hiring of
data processing (DP) specialists
• DP specialists created file structures, wrote
software, and designed application programs
• Resulted in numerous “home-grown” systems
being created
• Initially, computer files were similar in design to
manual files (see Figure 1.3)
17
1
Contents of Customer File

A small insurance company
18
1
Basic File Terminology
19
1
File Terminology
• Data
– Raw Facts
• Field
– Group of characters with specific meaning
– Used to define and store data
• Record
– Logically connected fields that describe a person, place,
or thing
• File
– Collection of related records
20
1
Example of a Simple File System
• DP specialist wrote programs for reports:
– Monthly summaries of types and amounts of insurance
sold by agents
– Monthly reports about which customers should be
contacted for renewal
– Reports that analyzed ratios of insurance types sold by
agent
– Customer contact letters summarizing coverage
• Other departments requested programs be written for them
– SALES file created for sales department
– AGENT file created for personnel department
21
1
Contents of the Agent File
22
1
Evolution of Simple File System
• As number of files increased, a small file system evolved
• Each file used its own application programs
• Each file was owned by individual or department who
commissioned its creation
23
1
A Simple File System
24
1
Example of a Simple File System
• As the file system grew,
demand for DP’s programming skills grew
• Additional programmers hired
• DP specialist evolved into DP manager, supervising a
DP department
• Primary activity of department (and DP manager)
remained programming
25
1
Problems with
File System Data Management
• Every task requires extensive programming in a thirdgeneration language (3GL)
– Programmer must specify task and how it must be done
• Modern databases use fourth-generation language
(4GL)
– Allows user to specify what must be done without
specifying how it is to be done
26
1
Problems with File System
Data Management
27
1
Problems with File System
Data Management
• Time-consuming, high-level activity
• As number of files increases, system
administration becomes difficult
• Making changes in existing file structure is
difficult
• File structure changes require modifications in all
programs that use data in that file
28
1
Problems with File System
Data Management
• Modifications are likely to produce errors,
requiring additional time to “debug” the program
• Security features hard to program and therefore
often omitted
29
1
Problems with
File System Data Management (con’t.)
•
Structural Dependence
– Changes in file structure require modification of
related programs
•
Data Dependence
– Changes in file data characteristics require
modification of data access programs
30
1
Field Definitions and Naming Conventions
(continued)
31
Problems with
File System Data Management (con’t.)
•
1
Data Redundancy
–
Same data are stored in many different locations.
–
Results of uncontrolled data redundancy
• Data inconsistency
– Different and conflicting versions of same data appear in
different places.
– Lack of data integrity (the validity of data)
• Data anomalies
– Update
» Agent Hahh : new phone number
– Insertion
» add a new customer
– Deletion
» Agent Hahh quits
32
1
Database Systems vs. File Systems
• File system
– Many separate and unrelated files
• Database system
– logically related data stored in a single repository
• Database systems provide advantages over file system
– Eliminates
• inconsistency,
• data anomalies,
• data dependency, and
• structural dependency problems
– Stores data structures, relationships, and access paths
33
1
Contrasting Database and File Systems
34
The Database System Environment
•
1
Database system is composed of 5 main parts:
1. Hardware
2. Software
•
•
•
Operating system software
DBMS software
Application programs and utility software
3. People
•
•
•
•
•
SA (System Administrator)
DBA (Database Administrator)
Database designers
System analysts and programmers
End users
4. Procedures
5. Data
35
The Database System Environment
1
36
1
DBMS Functions
•
Performs functions that guarantee integrity and
consistency of data
1. Data dictionary management (Fig. 1.8)
•
defines data elements and their relationships (metadata)
2. Data storage management (Fig. 1.9)
•
stores data and related data entry forms, report definitions,
etc.
3. Data transformation and presentation
•
translates logical requests into commands to
physically locate and retrieve the requested data
37
1
DBMS Functions (continued)
4. Security management
•
enforces user security and data privacy within database
5. Multi-user access control
•
creates structures that allow multiple users to access the data
6. Backup and recovery management
•
provides backup and data recovery procedures
38
1
DBMS Functions (continued)
7. Data integrity management
•
promotes and enforces integrity rules to eliminate data
integrity problems
8. Database access languages and
application programming interfaces
•
provides data access through a query language
9. Database communication interfaces
•
allow database to accept end-user requests via multiple,
different network environments
39
1
Illustrating Metadata with Microsoft Access
40
1
Illustrating Data Storage Management with Oracle
41
Summary
1
• Information is derived from data, which is stored in a database
• To implement and manage a database, use a DBMS
• Database design defines its structure
• Good design is important
• Databases were preceded by file systems
• Because file systems lack a DBMS, file management becomes
difficult as a file system grows
• DBMS were developed to address file systems’ inherent weaknesses
42