About the Author |
|
xiii | |
About the Technical Reviewer |
|
xv | |
Chapter 1 Introduction to Db2 |
|
1 | (8) |
|
What Is a Relational Database? |
|
|
3 | (3) |
|
|
3 | (1) |
|
|
4 | (1) |
|
|
4 | (1) |
|
|
4 | (1) |
|
|
5 | (1) |
|
|
5 | (1) |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
6 | (2) |
|
Data Definition Language (DDL) |
|
|
7 | (1) |
|
Data Query Language (DQL) |
|
|
7 | (1) |
|
Data Control Language (DCL) |
|
|
7 | (1) |
|
Data Manipulation Language (DML) |
|
|
7 | (1) |
|
|
8 | (1) |
|
|
8 | (1) |
Chapter 2 Installing Db2 |
|
9 | (14) |
|
My Development Environment |
|
|
9 | (1) |
|
Installation Prerequisites |
|
|
10 | (1) |
|
|
11 | (1) |
|
|
12 | (7) |
|
|
19 | (1) |
|
Installing the Db2 Sample Database |
|
|
20 | (1) |
|
|
21 | (2) |
Chapter 3 Db2 Management |
|
23 | (22) |
|
|
23 | (7) |
|
|
25 | (1) |
|
Instance Environment Commands |
|
|
25 | (1) |
|
|
26 | (1) |
|
Arranging a Communication Port and Host for an Instance |
|
|
26 | (1) |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
29 | (1) |
|
Using Other Commands with an Instance |
|
|
29 | (1) |
|
|
30 | (7) |
|
|
31 | (1) |
|
|
31 | (1) |
|
|
32 | (1) |
|
Storage Group Control Files |
|
|
33 | (1) |
|
Global Configuration File |
|
|
33 | (1) |
|
|
33 | (1) |
|
|
33 | (1) |
|
Automated Storage Containers |
|
|
33 | (1) |
|
|
34 | (1) |
|
|
35 | (1) |
|
|
36 | (1) |
|
|
36 | (1) |
|
|
36 | (1) |
|
|
36 | (1) |
|
|
37 | (7) |
|
|
39 | (1) |
|
|
39 | (2) |
|
|
41 | (2) |
|
|
43 | (1) |
|
Other Table SQL Statements |
|
|
43 | (1) |
|
|
44 | (1) |
|
|
44 | (1) |
Chapter 4 Database Physical Design |
|
45 | (10) |
|
Phase 1: Data Gathering and Normalization |
|
|
46 | (5) |
|
|
46 | (2) |
|
|
48 | (3) |
|
|
51 | (1) |
|
Phase 2: Physical Design of the Database |
|
|
51 | (2) |
|
|
52 | (1) |
|
|
53 | (2) |
Chapter 5 Db2 Utilities |
|
55 | (12) |
|
|
56 | (3) |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
57 | (1) |
|
|
57 | (2) |
|
|
59 | (2) |
|
|
60 | (1) |
|
|
60 | (1) |
|
|
61 | (1) |
|
|
61 | (1) |
|
|
62 | (1) |
|
|
62 | (1) |
|
|
63 | (2) |
|
|
64 | (1) |
|
|
65 | (2) |
Chapter 6 Business Rules and Constraints |
|
67 | (10) |
|
|
67 | (1) |
|
|
68 | (1) |
|
|
69 | (1) |
|
|
70 | (1) |
|
CHECK and Unique Constraints |
|
|
71 | (1) |
|
|
72 | (1) |
|
|
72 | (4) |
|
|
76 | (1) |
Chapter 7 Writing Good SQL for Db2 |
|
77 | (10) |
|
|
77 | (1) |
|
Reduce Passes Through Data |
|
|
78 | (3) |
|
Using Indexes to Increase Performance |
|
|
81 | (1) |
|
|
81 | (1) |
|
|
82 | (1) |
|
Use Db2 Utilities Where Possible |
|
|
83 | (1) |
|
|
84 | (2) |
|
Multiple Ways to Code SQL |
|
|
86 | (1) |
|
|
86 | (1) |
Chapter 8 Python and ibm_db |
|
87 | (52) |
|
Your First Python ibm_db Program |
|
|
89 | (41) |
|
|
96 | (2) |
|
More on Parameter Markers |
|
|
98 | (2) |
|
Producing Multiple Reports with Parameter Markers |
|
|
100 | (3) |
|
Using Parameter Markers Without Binding Variables |
|
|
103 | (3) |
|
|
106 | (3) |
|
Inserts, Updates, and Deletes |
|
|
109 | (3) |
|
|
112 | (4) |
|
Creating Database Objects |
|
|
116 | (4) |
|
Obtaining Attributes of an Existing Table |
|
|
120 | (6) |
|
Obtaining Attributes of a Result Set |
|
|
126 | (4) |
|
|
130 | (3) |
|
Where Is the ibm_db Module Going? |
|
|
133 | (4) |
|
|
134 | (1) |
|
The Django Database Interface |
|
|
134 | (1) |
|
|
135 | (1) |
|
|
136 | (1) |
|
|
137 | (1) |
|
|
137 | (2) |
Appendix A: Python ibm_db API |
|
139 | (72) |
|
|
139 | (71) |
|
|
139 | (1) |
|
|
140 | (1) |
|
|
141 | (2) |
|
|
143 | (1) |
|
|
144 | (2) |
|
|
146 | (1) |
|
|
147 | (1) |
|
|
148 | (3) |
|
|
151 | (1) |
|
|
152 | (1) |
|
|
153 | (1) |
|
|
154 | (3) |
|
|
157 | (1) |
|
|
158 | (1) |
|
|
159 | (1) |
|
|
160 | (1) |
|
|
160 | (2) |
|
|
162 | (1) |
|
|
163 | (2) |
|
|
165 | (1) |
|
|
166 | (1) |
|
|
167 | (1) |
|
|
168 | (1) |
|
ibm_db.field_display_size |
|
|
169 | (1) |
|
|
169 | (1) |
|
|
170 | (2) |
|
|
172 | (1) |
|
|
173 | (1) |
|
|
174 | (1) |
|
|
174 | (1) |
|
|
175 | (3) |
|
|
178 | (1) |
|
|
179 | (1) |
|
|
179 | (2) |
|
|
181 | (2) |
|
|
183 | (1) |
|
|
184 | (1) |
|
|
185 | (2) |
|
|
187 | (1) |
|
|
188 | (2) |
|
|
190 | (2) |
|
|
192 | (2) |
|
|
194 | (1) |
|
|
194 | (1) |
|
|
195 | (1) |
|
|
196 | (3) |
|
|
199 | (2) |
|
|
201 | (2) |
|
|
203 | (3) |
|
|
206 | (1) |
|
|
206 | (1) |
|
|
207 | (2) |
|
|
209 | (1) |
|
|
210 | (1) |
Index |
|
211 | |