Audience:
Application programmers who need to write embedded SQL programs in C language.
This course addresses the use of static and simple dynamic embedded SQL. It also addresses coding of stored procedures.
If your programming needs include the use of User Defined Functions (UDF), Application Programming Interfaces (API), or Call Level Interface (CLI), you should also complete:
Prerequisites:
You should complete:
- DB2 Family Fundamentals (CE030)
- DB2 SQL Workshop (CE120) or
- Introduction to C Programming - AIX/UNIX (Q1070)
or have equivalent knowledge. You should have experience with SQL and C programming languages and be able to complete skeleton programs in C and construct and use SQL statements.
Skills taught:
- Incorporate static SQL statements in an application program
- Prepare the program for execution
- Validate execution results are correct
- Produce code to support multiple rows being returned from the database manager using cursors
- Identify considerations regarding units of work, concurrency, and restart of programs
- Identify differences between static and dynamic SQL
- Provide test data for applications
- Discuss program and DB2 options relative to performance of static SQL
Course outline:
DB2 concepts:
- identify DB2 family products
- explain DB2 workstation component functions
- identify DB2 objects
- identify the key differences between static SQL and other application alternatives for accessing DB2 data
Program structure I:
- embed INSERT, UPDATE, DELETE and single-row SELECT statements in application programs
- effectively communicate with DB2 when processing NULL values and determining the success of statement execution
- demonstrate use of DB2 coding aids
- code CONNECT statements within an application program
- identify connection types and impacts on a unit of work
Program preparation:
- identify the additional steps necessary to prepare a program that contains embedded SQL for execution
- describe the functions of the DB2 PRECOMPILE and BIND processes
- describe factors relevant to the BIND process, including RUNSTATS positioning, package status, parameters, and authorization requirements
Program structure II:
- use DECLARE, OPEN, FETCH, and CLOSE CURSOR statements to handle select criteria that may return multiple rows in application programs
- issue positioned UPDATE and DELETE statements
- use compound SQL
Recovery and locking concepts:
- define a unit of recovery
- identify the basic locking strategies used by DB2
Dynamic SQL introduction:
- describe the difference between static and dynamic SQL
- list the types of dynamic statements
- code dynamic SQL in a program
Managing test data:
- identify methods to insert data into a table
- use the LOAD or IMPORT utility
- identify the purpose of the RUNSTATS utility
- identify the purpose of the REORG utility
Performance considerations:
- use programming techniques that enhance DB2 application performance by following general guidelines, using indexable predicates, and avoiding unnecessary sorts
- identify the access paths available to DB2
- list common causes of deadlocks and avoid such causes when possible
- use the EXPLAIN tools as aids to develop applications that emphasize performance
Daily Agenda:
Day 1
- Welcome
- Unit 1 - DB2 Concepts
- Lab - DDL
- Unit 2 - Program Structure - Part 1
- Lab - Program Structure I
Day 2
- Unit 3 - Program Preparation
- Lab - Program Preparation
- Unit 4 - Program Structure - Part 2
- Lab - Program Structure II
- Unit 5 - Recovery and Locking Concepts
- Lab - Cursor Restart
Day 3
- Unit 6 - Dynamic SQL Introduction
- Lab - Dynamic SQL
- Unit 7 - Managing Test Data
- Lab - Loading Data
- Unit 8 - Performance Considerations
- Lab - Performance
For more information /quotation / training details please dial 1-630-355-6292 (Monday - Friday: 8AM to 6PM),alternatively you can email us at info@royalcyber.com or Contact us and our team of consultants will assist you further. |