Chapter 2: Introduction to Database Development

Download Report

Transcript Chapter 2: Introduction to Database Development

Database Processing
Chapter 15
Relational Implementation
with DB2
David M. Kroenke
© 2000 Prentice Hall
Chapter 15
DB2
“Database2; DBMS product licensed by
IBM intended primarily for large IBM
mainframes”
Page 411
© 2000 Prentice Hall
KDK Relations
Figure 15-16
© 2000 Prentice Hall
Chapter 15
Key Features of DB2
•
•
•
•
•
Implements a relational DBMS
Runs on IBM’s MVS operating system
Uses SQL to perform operations
Well suited to a multi-user environment
Robust recovery systems
• Uses DB2 Data Definition Language
Page 424
© 2000 Prentice Hall
Chapter 15
DB2 Data Definition Language
• TABLE stores data
• VIEW virtual table
• TABLE SPACE a collection of one or more
VSAM data sets (standard nondatabase
IBM mainframe files)
• INDEX overhead data used to speed
sorting and retrieving data
Page 425
© 2000 Prentice Hall
Chapter 15
DB2 Data Definition Language
• INDEX SPACES area of disk storage
where DB2 stores an index
• DATA BASES a collection of DB2 tables
and indexes and the storage areas that
hold them
• STORAGE GROUPS a group of disk
volumes on which DB2 allocates space for
user data bases
Page 425
© 2000 Prentice Hall
DB2 Data Types
Figure 15-24
© 2000 Prentice Hall
Chapter 15
Using DB2
•
•
•
•
Create Tables, Views, and Indexes
Delete Tables and Views
Use DB2 SQL to Manipulate Data
Use SQL Statements in the
Procedure Division
Page 428
© 2000 Prentice Hall
Chapter 15
DB2 Concurrent Processing
“implemented through shared locks
(allow other applications to read the
data) and exclusive locks (prevent all
other applications from accessing the
data)”
Page 435
© 2000 Prentice Hall
Chapter 15
DB2 Concurrent Processing
Issues
• COMMIT and ROLLBACK
• DEADLOCK
Page 437
© 2000 Prentice Hall
Chapter 15
DB2 Backup and Recovery
Issues
• Before-images
• After-images
• Backing up only pages in a table space
that have been modified since the
latest backup
Page 437
© 2000 Prentice Hall
Chapter 15
DB2 Security Issues
• Views
• Limiting Access to DB2 Resources
• Identifying Users
Page 438
© 2000 Prentice Hall
Relational Implementation
Figure 15-29
© 2000 Prentice Hall
Table
Descriptions
Figure 15-30
© 2000 Prentice Hall
Interactive
DB2
Statements
Figure 15-32
© 2000 Prentice Hall
DB2
Queries
Figure 15-32
© 2000 Prentice Hall
COBOL
Program
Figure 15-33a
© 2000 Prentice Hall