Preface |
|
xi | |
|
|
1 | (16) |
|
Introduction to Databases |
|
|
1 | (7) |
|
Nonrelational Database Systems |
|
|
2 | (3) |
|
|
5 | (2) |
|
|
7 | (1) |
|
|
8 | (5) |
|
|
9 | (1) |
|
SQL: A Nonprocedural Language |
|
|
10 | (1) |
|
|
11 | (2) |
|
|
13 | (1) |
|
|
14 | (1) |
|
|
15 | (2) |
|
2 Creating and Populating a Database |
|
|
17 | (28) |
|
Creating a MySQL Database |
|
|
17 | (1) |
|
Using the mysql Command-Line Tool |
|
|
18 | (2) |
|
|
20 | (7) |
|
|
20 | (3) |
|
|
23 | (2) |
|
|
25 | (2) |
|
|
27 | (6) |
|
|
27 | (1) |
|
|
28 | (2) |
|
Step 3 Building SQL Schema Statements |
|
|
30 | (3) |
|
Populating and Modifying Tables |
|
|
33 | (6) |
|
|
33 | (5) |
|
|
38 | (1) |
|
|
38 | (1) |
|
When Good Statements Go Bad |
|
|
39 | (2) |
|
|
39 | (1) |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
40 | (1) |
|
|
41 | (4) |
|
|
45 | (22) |
|
|
45 | (2) |
|
|
47 | (1) |
|
|
48 | (5) |
|
|
50 | (1) |
|
|
51 | (2) |
|
|
53 | (5) |
|
|
53 | (3) |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
58 | (2) |
|
The group by and having Clauses |
|
|
60 | (1) |
|
|
61 | (4) |
|
Ascending Versus Descending Sort Order |
|
|
63 | (1) |
|
Sorting via Numeric Placeholders |
|
|
64 | (1) |
|
|
65 | (2) |
|
|
65 | (1) |
|
|
65 | (1) |
|
|
65 | (1) |
|
|
65 | (2) |
|
|
67 | (20) |
|
|
67 | (3) |
|
|
68 | (1) |
|
|
69 | (1) |
|
|
70 | (1) |
|
|
71 | (11) |
|
|
71 | (2) |
|
|
73 | (4) |
|
|
77 | (2) |
|
|
79 | (3) |
|
Null: That Four-Letter Word |
|
|
82 | (3) |
|
|
85 | (2) |
|
|
86 | (1) |
|
|
86 | (1) |
|
|
86 | (1) |
|
|
86 | (1) |
|
5 Querying Multiple Tables |
|
|
87 | (14) |
|
|
87 | (6) |
|
|
88 | (1) |
|
|
89 | (2) |
|
|
91 | (2) |
|
Joining Three or More Tables |
|
|
93 | (5) |
|
Using Subqueries as Tables |
|
|
95 | (1) |
|
Using the Same Table Twice |
|
|
96 | (2) |
|
|
98 | (1) |
|
|
99 | (2) |
|
|
99 | (1) |
|
|
99 | (1) |
|
|
100 | (1) |
|
|
101 | (14) |
|
|
101 | (3) |
|
|
104 | (1) |
|
|
105 | (6) |
|
|
106 | (2) |
|
|
108 | (1) |
|
|
109 | (2) |
|
|
111 | (3) |
|
Sorting Compound Query Results |
|
|
111 | (1) |
|
|
112 | (2) |
|
|
114 | (1) |
|
|
114 | (1) |
|
|
114 | (1) |
|
|
114 | (1) |
|
7 Data Generation, Manipulation, and Conversion |
|
|
115 | (32) |
|
|
115 | (14) |
|
|
116 | (5) |
|
|
121 | (8) |
|
Working with Numeric Data |
|
|
129 | (5) |
|
Performing Arithmetic Functions |
|
|
129 | (2) |
|
Controlling Number Precision |
|
|
131 | (2) |
|
|
133 | (1) |
|
Working with Temporal Data |
|
|
134 | (10) |
|
|
134 | (2) |
|
|
136 | (4) |
|
Manipulating Temporal Data |
|
|
140 | (4) |
|
|
144 | (1) |
|
|
145 | (2) |
|
|
145 | (1) |
|
|
145 | (1) |
|
|
145 | (2) |
|
8 Grouping and Aggregates |
|
|
147 | (14) |
|
|
147 | (3) |
|
|
150 | (5) |
|
Implicit Versus Explicit Groups |
|
|
151 | (1) |
|
|
152 | (1) |
|
|
153 | (1) |
|
|
153 | (2) |
|
|
155 | (4) |
|
|
155 | (1) |
|
|
156 | (1) |
|
|
157 | (1) |
|
|
157 | (2) |
|
|
159 | (1) |
|
|
160 | (1) |
|
|
160 | (1) |
|
|
160 | (1) |
|
|
160 | (1) |
|
|
161 | (26) |
|
|
161 | (2) |
|
|
163 | (1) |
|
|
163 | (8) |
|
Multiple-Row, Single-Column Subqueries |
|
|
164 | (5) |
|
|
169 | (2) |
|
|
171 | (4) |
|
|
173 | (1) |
|
Data Manipulation Using Correlated Subqueries |
|
|
174 | (1) |
|
|
175 | (9) |
|
Subqueries as Data Sources |
|
|
176 | (6) |
|
Subqueries as Expression Generators |
|
|
182 | (2) |
|
|
184 | (1) |
|
|
185 | (2) |
|
|
185 | (1) |
|
|
185 | (1) |
|
|
185 | (2) |
|
|
187 | (14) |
|
|
187 | (5) |
|
Left Versus Right Outer Joins |
|
|
190 | (1) |
|
|
191 | (1) |
|
|
192 | (6) |
|
|
198 | (1) |
|
|
199 | (2) |
|
|
200 | (1) |
|
|
200 | (1) |
|
Exercise 10-3 (Extra Credit) |
|
|
200 | (1) |
|
|
201 | (12) |
|
What Is Conditional Logic? |
|
|
201 | (1) |
|
|
202 | (3) |
|
Searched case Expressions |
|
|
202 | (2) |
|
|
204 | (1) |
|
Examples of case Expressions |
|
|
205 | (6) |
|
Result Set Transformations |
|
|
205 | (1) |
|
|
206 | (2) |
|
|
208 | (1) |
|
|
209 | (1) |
|
|
210 | (1) |
|
|
211 | (2) |
|
|
211 | (1) |
|
|
211 | (2) |
|
|
213 | (10) |
|
|
213 | (2) |
|
|
214 | (1) |
|
|
214 | (1) |
|
|
215 | (7) |
|
|
217 | (1) |
|
|
218 | (1) |
|
|
219 | (3) |
|
|
222 | (1) |
|
|
222 | (1) |
|
13 Indexes and Constraints |
|
|
223 | (16) |
|
|
223 | (10) |
|
|
224 | (5) |
|
|
229 | (2) |
|
|
231 | (1) |
|
|
232 | (1) |
|
|
233 | (4) |
|
|
234 | (3) |
|
|
237 | (2) |
|
|
237 | (1) |
|
|
237 | (2) |
|
|
239 | (12) |
|
|
239 | (3) |
|
|
242 | (3) |
|
|
242 | (1) |
|
|
243 | (1) |
|
|
244 | (1) |
|
|
244 | (1) |
|
|
245 | (4) |
|
|
246 | (1) |
|
|
247 | (2) |
|
|
249 | (2) |
|
|
249 | (1) |
|
|
250 | (1) |
|
|
251 | (16) |
|
|
251 | (1) |
|
|
252 | (5) |
|
|
257 | (8) |
|
Schema Generation Scripts |
|
|
257 | (3) |
|
|
260 | (1) |
|
|
261 | (4) |
|
|
265 | (2) |
|
|
265 | (1) |
|
|
265 | (2) |
|
|
267 | (20) |
|
Analytic Function Concepts |
|
|
267 | (3) |
|
|
268 | (1) |
|
|
269 | (1) |
|
|
270 | (7) |
|
|
271 | (3) |
|
Generating Multiple Rankings |
|
|
274 | (3) |
|
|
277 | (7) |
|
|
279 | (2) |
|
|
281 | (2) |
|
Column Value Concatenation |
|
|
283 | (1) |
|
|
284 | (3) |
|
|
284 | (1) |
|
|
285 | (1) |
|
|
285 | (2) |
|
17 Working with Large Databases |
|
|
287 | (16) |
|
|
287 | (10) |
|
|
288 | (1) |
|
|
288 | (1) |
|
|
289 | (1) |
|
|
289 | (8) |
|
|
297 | (1) |
|
|
297 | (1) |
|
|
298 | (1) |
|
|
299 | (4) |
|
|
299 | (1) |
|
NoSQL and Document Databases |
|
|
300 | (1) |
|
|
300 | (1) |
|
|
301 | (2) |
|
|
303 | (16) |
|
Introduction to Apache Drill |
|
|
303 | (1) |
|
Querying Files Using Drill |
|
|
304 | (2) |
|
Querying MySQL Using Drill |
|
|
306 | (3) |
|
Querying MongoDB Using Drill |
|
|
309 | (6) |
|
Drill with Multiple Data Sources |
|
|
315 | (2) |
|
|
317 | (2) |
A ER Diagram for Example Database |
|
319 | (2) |
B Solutions to Exercises |
|
321 | (28) |
Index |
|
349 | |