DB2 for z/OS and SQL

Overview

First, the concepts of DB2 are presented and discussed.

The Structured Query Language (SQL) is presented as the means to access DB2 data (and to create and secure DB2 components).

Several guided, hands-on, practice sessions give each attendee an opportunity to use SQL to access data. QMF and/or SPUFI are used to execute SQL statements. Referential Integrity concepts and implementation are covered.

LEARNING OBJECTIVES

As a result of this class, the attendee will be able to

  • Explain DB2 concepts, terminology and components
  • Discuss the Primary Key (PK) and Foreign Key (FK) concept
  • SELECT rows of data from DB2 tables
  • Use QMF and/or SPUFI to "run" SQL statements
  • Use the WHERE clause to SELECT specific rows of a DB2 table
  • Build queries using the ORDER BY, GROUP BY, HAVING clauses
  • JOIN tables together to get information from each
  • CREATE Tables, Indexes, Views
  • "Change" tables using the INSERT, UPDATE, DELETE statements
  • Discuss the major considerations for DB2 Application Performance Tuning
  • Identify "good" predicates & "bad" predicates
The following "Release Dependent" features can be covered as needed -
  • Version 8 - Table-Controlled Partitioning, Common Table Expression, Dynamic Scrollable Cursors, multi-row FETCH and INSERT, GET DIAGNOSTICS, Recursive SQL, Sequence Objects, Scalar Full Select, Select Statement In An Insert statement, Delimited LOAD / UNLOAD, MQT's
  • Version 9 - PureXML, New Data Types - bigger BINARY, VARBINARY, BIGINT, DECFLOAT, INSTEAD OF triggers, INTERSECT and EXCEPT, TRUNCATE Statement, MERGE Statement, Native SQL Stored Procedures, Optimistic Concurrency Control, Automatic Object Creation, Skip Locked Data, REOPT (AUTO)
Audience

Experienced Data Processing personnel who need use SQL to access DB2 data.

Prerequisites

At least six months of TSO/ISPF is recommended. No previous database experience is needed.

Course duration

2 days

Course outline

-->
DAY 1
 
  1. Introduction to DB2


    • Course Introduction
    1. DB2 - Concepts, and Terminology

  2. Structured Query Language (SQL)


    1. SQL 1 - The SELECT Statement
           Hands-on Lab - SELECT
    2. Database 2 Interactive
    3. SQL 2 - SQL Features
           Hands-on Lab - SELECT / Special Features
    4. SQL 3 - ORDER BY, GROUP BY, HAVING
           Hands-on Lab - ORDER BY, GROUP BY, HAVING
DAY 2
 
  1. Structured Query Language (SQL)(Continued)


    1. SQL 4 - Join, Sub-select, UNION
           Hands-on Lab - Join, Sub-select, UNION
    2. SQL 5 - Data Definition Language
    3. SQL 6 - INSERT, UPDATE, DELETE
           Hands-on Lab - Creating DB2 Components - INSERT, UPDATE, DELETE
    4. SQL 7 - Data Control Language
Appendices

Appendix A - IBM Sample Tables Appendix I - DB2 for WINDOWs Overview
Appendix B - Bibliography Appendix J - Additional Features - UDT/UDF, Trigger
Appendix D - EXPLAIN PLAN Statement and PLAN_TABLE and DSN_STATEMNT_TABLE Appendix K - Group By Extensions
Appendix E - Hints to Success Appendix L - Visual Explain Overview
Appendix F - SQLCODES / SQLSTATES Appendix Z8 - Changes Summary - DB2 V8
Appendix G - QMF Overview Appendix Z9 - Changes Summary - DB2 V9
Appendix H - Stored Procedures Appendix Z9B- DB2 V9 Summary from IDUG Journal

Wintrac Inc.
16523 SW McGwire Ct.
Beaverton OR 97007
Wintrac, Inc. All rights reserved.                                                                               Site Map   |   Terms of Use   |   Privacy Policy