| About the Author |
|
iv | |
| Acknowledgments |
|
v | |
| Foreword |
|
xii | |
| Introduction |
|
xiii | |
|
|
|
xiv | |
|
|
|
xvi | |
|
|
|
xvii | |
|
|
|
xvii | |
|
|
|
xvii | |
| 1 IBM DB2 Certification |
|
1 | (34) |
|
DB2 10 and 10.1 Certification Roles |
|
|
2 | (12) |
|
IBM Certified Database Associate—DB2 10.1 Fundamentals |
|
|
2 | (2) |
|
IBM Certified Database Administrator—DB2 10.1 for Linux, UNIX, and Windows |
|
|
4 | (3) |
|
IBM Certified Database Administrator—DB2 10 for z/OS |
|
|
7 | (3) |
|
IBM Certified System Administrator—DB2 10 for z/OS |
|
|
10 | (2) |
|
IBM Certified Advanced Database Administrator—DB2 10.1 for Linux, UNIX, and Windows |
|
|
12 | (2) |
|
Additional DB2 9.7 Certification Roles |
|
|
14 | (4) |
|
IBM Certified Application Developer—DB2 9.7 for Linux, UNIX, and Windows |
|
|
14 | (2) |
|
IBM Certified Solution Developer—DB2 9.7 SQL Procedure |
|
|
16 | (2) |
|
The Certification Process |
|
|
18 | (17) |
|
Preparing for the Certification Exams |
|
|
18 | (2) |
|
Arranging to Take a Certification Exam |
|
|
20 | (2) |
|
Taking an IBM Certification Exam |
|
|
22 | (13) |
| 2 Planning |
|
35 | (28) |
|
|
|
36 | (11) |
|
|
|
38 | (2) |
|
|
|
40 | (1) |
|
DB2 Workgroup Server Edition (WSE) |
|
|
41 | (2) |
|
DB2 Enterprise Server Edition (ESE) |
|
|
43 | (1) |
|
DB2 Advanced Enterprise Server Edition (AESE) |
|
|
44 | (1) |
|
|
|
45 | (2) |
|
|
|
47 | (5) |
|
Optimized Solutions for Each Workload Type |
|
|
49 | (3) |
|
Managing Nonrelational Data |
|
|
52 | (4) |
|
|
|
53 | (2) |
|
|
|
55 | (1) |
|
DB2's Comprehensive Tool Set |
|
|
56 | (7) |
|
The DB2 Command Line Processor |
|
|
56 | (3) |
|
|
|
59 | (4) |
| 3 Security |
|
63 | (44) |
|
Controlling Database Access |
|
|
64 | (1) |
|
|
|
64 | (3) |
|
Where Authentication Takes Place |
|
|
65 | (2) |
|
Authorities and Privileges |
|
|
67 | (16) |
|
Administrative Authorities |
|
|
68 | (4) |
|
|
|
72 | (11) |
|
Granting Authorities and Privileges |
|
|
83 | (5) |
|
|
|
84 | (3) |
|
|
|
87 | (1) |
|
Revoking Authorities and Privileges |
|
|
88 | (3) |
|
REVOKE Statement Examples |
|
|
90 | (1) |
|
Row and Column Access Control (RCAC) |
|
|
91 | (5) |
|
|
|
92 | (2) |
|
|
|
94 | (2) |
|
Activating Row and Column Access Control |
|
|
96 | (1) |
|
Label-Based Access Control (LBAC) |
|
|
96 | (8) |
|
Security Label Components |
|
|
97 | (1) |
|
|
|
98 | (2) |
|
|
|
100 | (1) |
|
Granting Security Labels to Users |
|
|
101 | (1) |
|
Implementing Row-Level LBAC Protection |
|
|
102 | (1) |
|
Implementing Column-Level LBAC Protection |
|
|
103 | (1) |
|
A Word About Trusted Contexts |
|
|
104 | (3) |
| 4 Working with Databases and Database Objects |
|
107 | (44) |
|
Servers, Instances, and Databases |
|
|
108 | (1) |
|
|
|
109 | (26) |
|
|
|
109 | (16) |
|
|
|
125 | (10) |
|
|
|
135 | (4) |
|
Establishing a Database Connection |
|
|
139 | (5) |
|
Tjpe 1 and Tjpe 2 Connections |
|
|
140 | (2) |
|
|
|
142 | (2) |
|
Temporal Data Management and Time Travel Tables |
|
|
144 | (7) |
|
Basic Temporal Data Concepts |
|
|
144 | (7) |
| 5 Working with DB2 Data Using SQL |
|
151 | (106) |
|
Structured Query Language (SQL) |
|
|
152 | (1) |
|
SQL Data Manipulation Language (DML) Statements |
|
|
153 | (11) |
|
|
|
153 | (3) |
|
|
|
156 | (3) |
|
|
|
159 | (3) |
|
|
|
162 | (2) |
|
A Closer Look at the SELECT Statement and Its Clauses |
|
|
164 | (51) |
|
Other SELECT Statement Clauses |
|
|
168 | (1) |
|
|
|
169 | (11) |
|
|
|
180 | (1) |
|
The GROUP BY ROLLUP Clause |
|
|
181 | (2) |
|
|
|
183 | (2) |
|
|
|
185 | (1) |
|
|
|
186 | (1) |
|
|
|
187 | (2) |
|
|
|
189 | (1) |
|
A Word About Common Table Expressions |
|
|
190 | (2) |
|
A Word About CASE Expressions |
|
|
192 | (4) |
|
|
|
196 | (11) |
|
Using a Set Operator to Combine the Results of Two or More Queries |
|
|
207 | (8) |
|
Using a Cursor to Obtain Results from a Result Data Set |
|
|
215 | (8) |
|
The DECLARE CURSOR Statement |
|
|
216 | (2) |
|
|
|
218 | (1) |
|
|
|
219 | (1) |
|
|
|
220 | (1) |
|
|
|
221 | (2) |
|
Working with Temporal (Time Travel) Tables |
|
|
223 | (7) |
|
Querying System-Period Temporal Tables |
|
|
225 | (1) |
|
Querying Application-Period Temporal Tables |
|
|
226 | (3) |
|
Querying Bitemporal Temporal Tables |
|
|
229 | (1) |
|
|
|
230 | (5) |
|
Working with User-Defined Functions (UDFs) |
|
|
235 | (6) |
|
Creating SQL Scalar and SQL Table User-Defined Functions |
|
|
237 | (3) |
|
Invoking SQL Scalar and SQL Table User-Defined Functions |
|
|
240 | (1) |
|
Working with Stored Procedures |
|
|
241 | (7) |
|
Developing and Registering SQL Stored Procedures |
|
|
242 | (4) |
|
Calling a Stored Procedure |
|
|
246 | (2) |
|
Transactions and Transaction Boundaries |
|
|
248 | (9) |
|
Transaction Management with Savepoints |
|
|
252 | (5) |
| 6 Working with DB2 Tables, Views, and Indexes |
|
257 | (84) |
|
|
|
258 | (9) |
|
|
|
259 | (1) |
|
Character String Data Types |
|
|
260 | (3) |
|
|
|
263 | (1) |
|
|
|
264 | (1) |
|
The Extensible Markup Language (XML) Data Type |
|
|
265 | (1) |
|
A Word About the Oracle Compatibility Data Types |
|
|
266 | (1) |
|
|
|
267 | (1) |
|
Understanding Data Constraints |
|
|
267 | (29) |
|
|
|
268 | (1) |
|
|
|
268 | (4) |
|
|
|
272 | (2) |
|
|
|
274 | (1) |
|
Referential Integrity Constraints |
|
|
275 | (18) |
|
Informational Constraints |
|
|
293 | (3) |
|
|
|
296 | (21) |
|
Creating Tables with Identity Columns |
|
|
304 | (2) |
|
Creating Tables That Are Similar to Existing Tables |
|
|
306 | (1) |
|
A Quick Word About Schemas |
|
|
307 | (1) |
|
Examples of the CREATE TABLE Statement |
|
|
308 | (9) |
|
|
|
317 | (2) |
|
A Closer Look at Temporary Tables |
|
|
319 | (4) |
|
|
|
323 | (6) |
|
|
|
329 | (3) |
|
A Closer Look at Triggers |
|
|
332 | (9) |
| 7 Data Concurrency |
|
341 | (36) |
|
Understanding Data Consistency |
|
|
342 | (1) |
|
Transactions, Isolation Levels, and Locks |
|
|
342 | (35) |
|
|
|
344 | (8) |
|
Choosing the Proper Isolation Level |
|
|
352 | (2) |
|
Specifying the Isolation Level to Use |
|
|
354 | (2) |
|
|
|
356 | (1) |
|
Lock Attributes and Lock States |
|
|
357 | (4) |
|
|
|
361 | (2) |
|
Which Locks Are Acquired? |
|
|
363 | (1) |
|
|
|
364 | (1) |
|
Currently Committed Semantics |
|
|
365 | (4) |
|
Enabling Currently Committed Semantics Behavior |
|
|
369 | (1) |
|
|
|
369 | (8) |
| Appendix A: DB2 10.1 Fundamentals Exam (Exam 610) Objectives |
|
377 | (4) |
| Appendix B: Practice Questions |
|
381 | (58) |
| Appendix C: Answers to Practice Questions |
|
439 | (54) |
| Index |
|
493 | |