Foreword |
|
xv | |
Preface |
|
xvii | |
|
Introduction to Database Applications for DB2 |
|
|
1 | (18) |
|
|
2 | (1) |
|
DB2 UDB Server Instances and Databases |
|
|
2 | (6) |
|
|
3 | (1) |
|
|
4 | (1) |
|
DB2 Node and Database Directory |
|
|
5 | (1) |
|
Database Manager Configuration |
|
|
6 | (1) |
|
|
7 | (1) |
|
|
7 | (1) |
|
|
8 | (1) |
|
|
8 | (4) |
|
|
9 | (1) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
11 | (1) |
|
|
11 | (1) |
|
|
12 | (1) |
|
|
12 | (1) |
|
|
12 | (2) |
|
|
13 | (1) |
|
|
13 | (1) |
|
DB2 Application Structure |
|
|
14 | (4) |
|
|
14 | (1) |
|
Dynamic and Static Statement Execution |
|
|
15 | (1) |
|
|
15 | (2) |
|
Committing or Rolling Back Changes |
|
|
17 | (1) |
|
Disconnecting from a Database |
|
|
18 | (1) |
|
|
18 | (1) |
|
|
19 | (8) |
|
|
19 | (1) |
|
|
20 | (1) |
|
|
20 | (2) |
|
|
21 | (1) |
|
|
21 | (1) |
|
Driver-based Application Solutions |
|
|
22 | (3) |
|
Application Software Layers |
|
|
23 | (1) |
|
|
23 | (1) |
|
|
23 | (1) |
|
|
24 | (1) |
|
|
24 | (1) |
|
Perl Scripts Using the DBI |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
25 | (1) |
|
|
25 | (2) |
|
DB2 Programming Features and Strategies |
|
|
27 | (30) |
|
|
28 | (1) |
|
Data Manipulation Strategies |
|
|
28 | (12) |
|
|
28 | (1) |
|
|
29 | (2) |
|
|
31 | (1) |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
33 | (1) |
|
|
34 | (1) |
|
|
34 | (1) |
|
|
35 | (1) |
|
|
35 | (1) |
|
|
36 | (2) |
|
|
38 | (1) |
|
DB2 Built-In and User-Defined Functions |
|
|
38 | (1) |
|
STAR Schema Table/Index Design |
|
|
39 | (1) |
|
Concurrency and Transaction Management |
|
|
40 | (14) |
|
|
40 | (1) |
|
Database Locking Strategies and Isolation Levels |
|
|
41 | (3) |
|
|
44 | (1) |
|
|
44 | (2) |
|
|
46 | (2) |
|
DB2 Stored Procedure Builder |
|
|
48 | (6) |
|
Database Packages and Query Performance |
|
|
54 | (2) |
|
|
56 | (1) |
|
|
57 | (48) |
|
|
58 | (10) |
|
|
58 | (4) |
|
|
62 | (4) |
|
|
66 | (1) |
|
|
67 | (1) |
|
|
68 | (22) |
|
|
68 | (2) |
|
|
70 | (1) |
|
Transactions Involving Multiple Databases |
|
|
71 | (1) |
|
Connecting from an Application |
|
|
72 | (2) |
|
Error Handling---Using and Interpreting the SQLCA |
|
|
74 | (3) |
|
Error Handling---Message Retrieval |
|
|
77 | (1) |
|
|
78 | (1) |
|
Program Logic for Error Handling |
|
|
78 | (1) |
|
|
78 | (2) |
|
|
80 | (3) |
|
|
83 | (6) |
|
Application-Level Locking |
|
|
89 | (1) |
|
|
89 | (1) |
|
|
90 | (10) |
|
First Look at Dynamic SQL |
|
|
91 | (2) |
|
|
93 | (1) |
|
|
94 | (1) |
|
Types of Dynamic SQL Statements |
|
|
95 | (1) |
|
|
96 | (1) |
|
|
97 | (1) |
|
|
98 | (2) |
|
Comparing Dynamic SQL with Static SQL |
|
|
100 | (3) |
|
|
103 | (2) |
|
|
105 | (10) |
|
|
105 | (6) |
|
Application Migration Considerations |
|
|
111 | (1) |
|
Changed APIs and Data Structures |
|
|
111 | (1) |
|
|
111 | (3) |
|
|
114 | (1) |
|
CLI/ODBC and OLE DB Programming |
|
|
115 | (40) |
|
|
115 | (1) |
|
|
116 | (3) |
|
|
116 | (3) |
|
Setting up the CLI Environment |
|
|
119 | (3) |
|
|
119 | (1) |
|
|
120 | (1) |
|
|
120 | (1) |
|
|
121 | (1) |
|
Accessing a DB2 Database via ODBC |
|
|
121 | (1) |
|
ODBC Development Considerations |
|
|
122 | (1) |
|
Basic Program Flow for a CLI Application |
|
|
122 | (9) |
|
Initializing Handle Types and Connecting |
|
|
123 | (1) |
|
Connecting to One or More Data Sources |
|
|
124 | (1) |
|
Disconnecting and Termination |
|
|
125 | (1) |
|
|
125 | (4) |
|
Diagnostics and Error Processing |
|
|
129 | (2) |
|
Advanced Programming Features |
|
|
131 | (18) |
|
|
131 | (1) |
|
|
132 | (1) |
|
|
133 | (5) |
|
Retrieving Results with Scrollable Cursors |
|
|
138 | (11) |
|
|
149 | (3) |
|
|
150 | (2) |
|
Installing the OLE DB Driver |
|
|
152 | (1) |
|
|
152 | (3) |
|
|
155 | (42) |
|
|
155 | (1) |
|
|
156 | (25) |
|
|
157 | (1) |
|
Changing between DB2 JDBC Driver Versions |
|
|
158 | (1) |
|
DB2 JDBC Development Prerequisites |
|
|
158 | (1) |
|
DB2 JDBC Applet (or net) Driver |
|
|
159 | (1) |
|
DB2 JDBC Application (or app) Driver |
|
|
160 | (1) |
|
|
161 | (1) |
|
|
162 | (1) |
|
|
163 | (1) |
|
|
163 | (1) |
|
|
164 | (1) |
|
|
165 | (1) |
|
|
166 | (1) |
|
|
167 | (1) |
|
|
168 | (1) |
|
Using Prepared Statements |
|
|
169 | (1) |
|
|
170 | (1) |
|
|
171 | (1) |
|
Updating Rows in a Result Set |
|
|
171 | (1) |
|
Specifying Result Set Type in JDBC 2.0 |
|
|
172 | (1) |
|
Using Scrollable Result Sets |
|
|
173 | (1) |
|
Calling Stored Procedures |
|
|
174 | (1) |
|
|
175 | (1) |
|
|
176 | (1) |
|
|
177 | (1) |
|
Concurrency and Isolation Levels |
|
|
178 | (1) |
|
Using DataSource Objects and Connection Pooling |
|
|
179 | (2) |
|
Java Naming and Directory Interface Support |
|
|
181 | (1) |
|
|
181 | (1) |
|
|
181 | (11) |
|
|
184 | (1) |
|
|
184 | (1) |
|
|
184 | (1) |
|
|
185 | (1) |
|
|
186 | (1) |
|
|
187 | (1) |
|
Default ConnectionContext |
|
|
188 | (1) |
|
User-Defined ConnectionContext Classes |
|
|
189 | (1) |
|
|
190 | (1) |
|
Properties of User-Defined SQLj Classes |
|
|
191 | (1) |
|
|
191 | (1) |
|
|
192 | (1) |
|
|
192 | (2) |
|
Setting up an Environment for JDBC 2.0 Stored Procedures |
|
|
194 | (1) |
|
|
194 | (1) |
|
|
194 | (3) |
|
|
197 | (18) |
|
|
197 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
199 | (1) |
|
|
199 | (5) |
|
|
200 | (1) |
|
|
200 | (1) |
|
|
200 | (2) |
|
|
202 | (2) |
|
|
204 | (8) |
|
|
205 | (4) |
|
|
209 | (1) |
|
|
210 | (1) |
|
|
210 | (2) |
|
|
212 | (1) |
|
|
212 | (1) |
|
|
213 | (1) |
|
|
213 | (2) |
|
|
215 | (10) |
|
|
215 | (1) |
|
|
215 | (1) |
|
Setting up the Perl Environment |
|
|
216 | (4) |
|
|
216 | (1) |
|
|
217 | (1) |
|
|
217 | (1) |
|
|
217 | (1) |
|
|
218 | (1) |
|
|
218 | (1) |
|
Installing the DBD::DB2 Module |
|
|
219 | (1) |
|
|
220 | (3) |
|
|
220 | (1) |
|
|
221 | (2) |
|
|
223 | (1) |
|
Disconnecting and Termination |
|
|
223 | (1) |
|
|
223 | (2) |
|
|
225 | (18) |
|
|
225 | (1) |
|
|
226 | (7) |
|
|
228 | (3) |
|
|
231 | (2) |
|
|
233 | (1) |
|
|
233 | (1) |
|
Benefits of Net Search Extender |
|
|
233 | (1) |
|
|
234 | (1) |
|
|
234 | (1) |
|
|
234 | (1) |
|
|
235 | (1) |
|
|
235 | (5) |
|
Mapping XML to a Relational Database |
|
|
238 | (1) |
|
|
239 | (1) |
|
|
240 | (1) |
|
|
240 | (3) |
Appendix A DB2 UDB Application Development Test Objectives |
|
243 | (4) |
Appendix B DB2 UDB Application Development Sample Exam |
|
247 | (18) |
Appendix C DB2MALL Database |
|
265 | (6) |
Appendix D Application Troubleshooting |
|
271 | (8) |
|
D.1 Obtaining an SQL Error |
|
|
272 | (1) |
|
D.2 Isolating Error Location |
|
|
272 | (1) |
|
D.3 Diagnostic Error Files |
|
|
272 | (2) |
|
|
273 | (1) |
|
|
273 | (1) |
|
|
274 | (1) |
|
|
274 | (1) |
|
|
274 | (1) |
|
|
274 | (5) |
|
|
274 | (1) |
|
|
275 | (2) |
|
|
277 | (2) |
Index |
|
279 | |