Introduction |
|
xxv | |
|
PART 1 INTRODUCTION TO DATABASES AND DATABASE DESIGN |
|
|
|
Chapter 1 Database Design Goals |
|
|
3 | (26) |
|
|
4 | (2) |
|
|
6 | (2) |
|
Strengths and Weaknesses of Information Containers |
|
|
8 | (1) |
|
Desirable Database Features |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
10 | (1) |
|
|
11 | (1) |
|
|
11 | (1) |
|
|
12 | (1) |
|
|
13 | (1) |
|
|
13 | (1) |
|
|
14 | (2) |
|
|
16 | (1) |
|
|
17 | (1) |
|
|
17 | (1) |
|
Low Cost and Extensibility |
|
|
18 | (1) |
|
|
19 | (1) |
|
|
19 | (1) |
|
|
20 | (1) |
|
|
21 | (1) |
|
Ability to Perform Complex Calculations |
|
|
21 | (1) |
|
|
22 | (1) |
|
|
22 | (1) |
|
Legal and Security Considerations |
|
|
23 | (1) |
|
Consequences of Good and Bad Design |
|
|
24 | (2) |
|
|
26 | (3) |
|
Chapter 2 Relational Overview |
|
|
29 | (18) |
|
|
30 | (1) |
|
Relational Points of View |
|
|
31 | (1) |
|
|
32 | (2) |
|
Relations, Attributes, and Tuples |
|
|
34 | (1) |
|
|
34 | (2) |
|
|
36 | (1) |
|
|
37 | (1) |
|
|
37 | (1) |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
38 | (1) |
|
|
38 | (2) |
|
|
40 | (1) |
|
|
41 | (1) |
|
|
41 | (3) |
|
|
44 | (3) |
|
|
47 | (36) |
|
|
47 | (3) |
|
|
50 | (1) |
|
|
50 | (1) |
|
|
50 | (1) |
|
|
51 | (1) |
|
|
52 | (1) |
|
Column-Oriented Databases |
|
|
53 | (1) |
|
|
53 | (1) |
|
|
54 | (1) |
|
|
55 | (1) |
|
|
55 | (1) |
|
|
55 | (1) |
|
|
56 | (1) |
|
|
56 | (3) |
|
|
59 | (1) |
|
|
59 | (1) |
|
|
60 | (1) |
|
|
61 | (3) |
|
|
64 | (2) |
|
|
66 | (1) |
|
|
67 | (2) |
|
|
69 | (1) |
|
|
70 | (1) |
|
|
70 | (1) |
|
|
70 | (1) |
|
|
70 | (1) |
|
|
71 | (1) |
|
|
72 | (1) |
|
|
72 | (1) |
|
|
73 | (1) |
|
|
74 | (2) |
|
|
76 | (7) |
|
Chapter 4 Understanding User Needs |
|
|
83 | (28) |
|
|
84 | (1) |
|
Brinq a List of Questions |
|
|
85 | (1) |
|
|
85 | (1) |
|
|
86 | (1) |
|
|
86 | (1) |
|
|
87 | (1) |
|
|
88 | (1) |
|
|
88 | (1) |
|
|
89 | (4) |
|
Pick the Customers' Brains |
|
|
93 | (1) |
|
Walk a Mile in the User's Shoes |
|
|
93 | (1) |
|
|
94 | (1) |
|
|
94 | (1) |
|
|
95 | (1) |
|
Understand the Customers' Reasoning |
|
|
96 | (1) |
|
Learn What the Customers Really Need |
|
|
97 | (1) |
|
|
98 | (1) |
|
Verify Your Understanding |
|
|
99 | (2) |
|
Create the Requirements Document |
|
|
101 | (1) |
|
|
102 | (4) |
|
|
106 | (1) |
|
|
106 | (5) |
|
PART 2 DATABASE DESIGN PROCES AND TECHNIQUES |
|
|
|
Chapter 5 Translating User Needs Into Data Models |
|
|
111 | (34) |
|
|
112 | (2) |
|
|
114 | (4) |
|
|
118 | (1) |
|
|
119 | (1) |
|
|
120 | (1) |
|
|
120 | (1) |
|
|
121 | (1) |
|
|
122 | (2) |
|
|
124 | (1) |
|
|
124 | (1) |
|
|
124 | (1) |
|
|
125 | (1) |
|
|
125 | (1) |
|
|
126 | (2) |
|
|
128 | (1) |
|
|
129 | (1) |
|
Entity-Relationship Models |
|
|
130 | (1) |
|
Entities, Attributes, and Identifiers |
|
|
131 | (1) |
|
|
132 | (1) |
|
|
133 | (1) |
|
|
134 | (2) |
|
|
136 | (1) |
|
|
137 | (1) |
|
|
137 | (1) |
|
Converting Semantic Object Models |
|
|
138 | (2) |
|
|
140 | (2) |
|
|
142 | (3) |
|
Chapter 6 Extracting Business Rules |
|
|
145 | (18) |
|
|
145 | (2) |
|
Identifying Key Business Rules |
|
|
147 | (5) |
|
Extracting Key Business Rules |
|
|
152 | (2) |
|
|
154 | (4) |
|
|
158 | (5) |
|
Chapter 7 Normalizing Data |
|
|
163 | (40) |
|
|
163 | (1) |
|
|
164 | (9) |
|
|
173 | (4) |
|
|
177 | (4) |
|
Stopping at Third Normal Form |
|
|
181 | (1) |
|
Boyce-Codd Normal Form (BCNF) |
|
|
181 | (4) |
|
|
185 | (5) |
|
|
190 | (3) |
|
Domain/Key Normal Form (DKNF) |
|
|
193 | (2) |
|
|
195 | (2) |
|
The Best Level of Normalization |
|
|
197 | (1) |
|
|
197 | (2) |
|
|
199 | (4) |
|
Chapter 8 Designing Databases To Support Software |
|
|
203 | (12) |
|
|
204 | (1) |
|
|
204 | (1) |
|
Consider Multi-Tier Architecture |
|
|
205 | (1) |
|
Convert Domains into Tables |
|
|
205 | (1) |
|
|
206 | (1) |
|
Use Three Kinds of Tables |
|
|
207 | (2) |
|
|
209 | (1) |
|
Allow Some Redundant Data |
|
|
210 | (1) |
|
Don't Squeeze in Everything |
|
|
211 | (1) |
|
|
212 | (3) |
|
Chapter 9 Using Common Design Patterns |
|
|
215 | (26) |
|
|
216 | (1) |
|
Many-to-Many Associations |
|
|
216 | (1) |
|
Multiple Many-to-Many Associations |
|
|
216 | (2) |
|
Multiple-Object Associations |
|
|
218 | (3) |
|
Repeated Attribute Associations |
|
|
221 | (1) |
|
|
222 | (1) |
|
One-to-One Reflexive Associations |
|
|
223 | (1) |
|
One-to-Many Reflexive Associations |
|
|
224 | (1) |
|
|
225 | (3) |
|
Hierarchical Data with NoSQL |
|
|
228 | (1) |
|
|
229 | (2) |
|
|
231 | (1) |
|
|
232 | (1) |
|
|
232 | (1) |
|
|
233 | (1) |
|
Deciding What to Temporalize |
|
|
234 | (2) |
|
|
236 | (1) |
|
|
236 | (1) |
|
|
237 | (1) |
|
|
238 | (3) |
|
Chapter 10 Avoiding Common Design Pitfalls |
|
|
241 | (22) |
|
|
241 | (1) |
|
|
242 | (1) |
|
|
242 | (2) |
|
|
244 | (1) |
|
|
245 | (3) |
|
|
248 | (1) |
|
Insufficient Normalization |
|
|
248 | (1) |
|
|
249 | (1) |
|
|
249 | (1) |
|
|
250 | (3) |
|
Not Enforcing Constraints |
|
|
253 | (1) |
|
|
253 | (3) |
|
Not Defining Natural Keys |
|
|
256 | (1) |
|
|
257 | (6) |
|
PART 3 A DETAILED CASE STUDY |
|
|
|
Chapter 11 Defining User Needs And Requirements |
|
|
263 | (20) |
|
|
263 | (2) |
|
Pick the Customers' Brains |
|
|
265 | (1) |
|
Determining What the System Should Do |
|
|
265 | (2) |
|
Determining How the Project Should Look |
|
|
267 | (1) |
|
Determining What Data Is Needed for the User Interface |
|
|
268 | (1) |
|
Determining Where the Data Should Come From |
|
|
269 | (1) |
|
Determining How the Pieces of Data Are Related |
|
|
269 | (2) |
|
Determining Performance Needs |
|
|
271 | (1) |
|
Determining Security Needs |
|
|
272 | (1) |
|
Determining Data Inteqrity Needs |
|
|
273 | (2) |
|
|
275 | (4) |
|
Write the Requirements Document |
|
|
279 | (1) |
|
|
280 | (1) |
|
|
281 | (2) |
|
Chapter 12 Building A Data Model |
|
|
283 | (20) |
|
|
283 | (1) |
|
Building an Initial Semantic Object Model |
|
|
283 | (3) |
|
Improving the Semantic Object Model |
|
|
286 | (3) |
|
Entity-Relationship Modeling |
|
|
289 | (1) |
|
|
289 | (2) |
|
Building a Combined ER Diagram |
|
|
291 | (2) |
|
Improving the Entity-Relationship Diagram |
|
|
293 | (1) |
|
|
294 | (4) |
|
|
298 | (1) |
|
|
299 | (4) |
|
|
|
Chapter 13 Extracting Business Rules |
|
|
303 | (10) |
|
Identifying Business Rules |
|
|
303 | (1) |
|
|
304 | (2) |
|
|
306 | (1) |
|
|
307 | (1) |
|
|
307 | (1) |
|
|
307 | (1) |
|
|
307 | (1) |
|
|
308 | (1) |
|
|
308 | (1) |
|
|
308 | (1) |
|
|
309 | (1) |
|
|
309 | (1) |
|
|
309 | (1) |
|
|
309 | (1) |
|
Drawing a New Relational Model |
|
|
310 | (1) |
|
|
310 | (3) |
|
Chapter 14 Normalizing And Refining |
|
|
313 | (14) |
|
|
313 | (2) |
|
Verifying First Normal Form |
|
|
315 | (3) |
|
Verifying Second Normal Form |
|
|
318 | (1) |
|
|
319 | (1) |
|
|
320 | (1) |
|
Verifying Third Normal Form |
|
|
321 | (2) |
|
|
323 | (4) |
|
Chapter 15 Example Overview |
|
|
327 | (12) |
|
|
327 | (2) |
|
|
329 | (2) |
|
|
331 | (1) |
|
|
332 | (1) |
|
Packages in Jupyter Notebook |
|
|
333 | (1) |
|
Packages in Visual Studio |
|
|
334 | (2) |
|
|
336 | (1) |
|
|
336 | (3) |
|
Chapter 16 MariaDB IN PYTHON |
|
|
339 | (16) |
|
|
340 | (1) |
|
|
340 | (3) |
|
|
343 | (1) |
|
|
344 | (1) |
|
|
344 | (2) |
|
|
346 | (2) |
|
|
348 | (2) |
|
|
350 | (2) |
|
|
352 | (3) |
|
|
355 | (14) |
|
|
355 | (1) |
|
|
356 | (1) |
|
|
356 | (2) |
|
|
358 | (2) |
|
|
360 | (4) |
|
|
364 | (2) |
|
|
366 | (3) |
|
Chapter 18 PostgreSQL IN PYTHON |
|
|
369 | (20) |
|
|
370 | (1) |
|
|
371 | (1) |
|
|
371 | (1) |
|
|
371 | (2) |
|
|
373 | (1) |
|
|
374 | (1) |
|
Define the customers Table |
|
|
374 | (2) |
|
|
376 | (1) |
|
Define the order items Table |
|
|
377 | (1) |
|
|
378 | (1) |
|
|
379 | (1) |
|
|
379 | (1) |
|
|
380 | (1) |
|
|
380 | (2) |
|
|
382 | (1) |
|
|
383 | (1) |
|
|
384 | (1) |
|
|
384 | (2) |
|
|
386 | (3) |
|
Chapter 19 PostgreSQL IN C# |
|
|
389 | (12) |
|
|
389 | (1) |
|
|
389 | (1) |
|
|
390 | (1) |
|
|
391 | (1) |
|
|
392 | (1) |
|
|
393 | (2) |
|
|
395 | (1) |
|
|
396 | (3) |
|
|
399 | (2) |
|
Chapter 20 Neo4j AuraDB IN PYTHON |
|
|
401 | (16) |
|
|
402 | (2) |
|
|
404 | (1) |
|
|
404 | (1) |
|
|
405 | (1) |
|
Install the Neo4j Database Adapter |
|
|
405 | (1) |
|
|
405 | (1) |
|
|
406 | (1) |
|
|
407 | (1) |
|
|
407 | (1) |
|
|
408 | (1) |
|
|
409 | (1) |
|
|
410 | (1) |
|
|
410 | (1) |
|
|
411 | (1) |
|
|
412 | (2) |
|
|
414 | (3) |
|
Chapter 21 Neo4j AuraDB IN C# |
|
|
417 | (14) |
|
|
418 | (1) |
|
|
418 | (1) |
|
|
419 | (1) |
|
|
419 | (1) |
|
|
420 | (1) |
|
|
421 | (1) |
|
|
422 | (1) |
|
|
422 | (1) |
|
|
423 | (1) |
|
|
424 | (1) |
|
|
424 | (2) |
|
|
426 | (2) |
|
|
428 | (3) |
|
Chapter 22 MongoDB ATLAS IN PYTHON |
|
|
431 | (22) |
|
Not Normal but Not Abnormal |
|
|
432 | (1) |
|
|
432 | (2) |
|
|
434 | (2) |
|
|
436 | (3) |
|
|
439 | (1) |
|
Install the PyMongo Database Adapter |
|
|
439 | (1) |
|
|
440 | (1) |
|
|
440 | (1) |
|
|
441 | (1) |
|
|
442 | (1) |
|
|
442 | (2) |
|
|
444 | (5) |
|
|
449 | (1) |
|
|
450 | (3) |
|
Chapter 23 MongoDB ATLAS IN C# |
|
|
453 | (14) |
|
|
454 | (1) |
|
Install the MongoDB Database Adapter |
|
|
454 | (1) |
|
|
454 | (1) |
|
|
455 | (1) |
|
|
456 | (1) |
|
|
457 | (1) |
|
|
458 | (4) |
|
|
462 | (3) |
|
|
465 | (2) |
|
Chapter 24 Apache Ignite In Python |
|
|
467 | (10) |
|
|
468 | (1) |
|
|
468 | (1) |
|
|
469 | (1) |
|
|
470 | (1) |
|
|
470 | (1) |
|
Install the pyignite Database Adapter |
|
|
471 | (1) |
|
Define the Building Class |
|
|
471 | (1) |
|
|
471 | (2) |
|
|
473 | (1) |
|
Demonstrate Volatile Data |
|
|
473 | (1) |
|
Demonstrate Persistent Data |
|
|
474 | (1) |
|
|
474 | (3) |
|
Chapter 25 Apache Ignite In C# |
|
|
477 | (12) |
|
|
477 | (1) |
|
Install the Ignite Database Adapter |
|
|
478 | (1) |
|
|
479 | (1) |
|
|
480 | (1) |
|
|
480 | (2) |
|
|
482 | (1) |
|
Demonstrate Volatile Data |
|
|
483 | (1) |
|
Demonstrate Persistent Data |
|
|
483 | (1) |
|
|
483 | (6) |
|
|
|
Chapter 26 Introduction To SQL |
|
|
489 | (30) |
|
|
491 | (1) |
|
|
491 | (1) |
|
|
492 | (1) |
|
|
493 | (2) |
|
|
495 | (1) |
|
|
495 | (3) |
|
|
498 | (5) |
|
|
503 | (1) |
|
|
504 | (1) |
|
|
504 | (2) |
|
|
506 | (1) |
|
|
506 | (1) |
|
|
507 | (4) |
|
|
511 | (1) |
|
|
511 | (1) |
|
|
512 | (1) |
|
|
513 | (1) |
|
|
514 | (1) |
|
|
515 | (4) |
|
Chapter 27 Building Databases With Sql Scripts |
|
|
519 | (14) |
|
|
519 | (1) |
|
|
520 | (1) |
|
Database Creation Scripts |
|
|
520 | (1) |
|
Basic Initialization Scripts |
|
|
520 | (1) |
|
Data Initialization Scripts |
|
|
520 | (1) |
|
|
521 | (1) |
|
|
521 | (1) |
|
|
522 | (9) |
|
|
531 | (2) |
|
Chapter 28 Database Maintenance |
|
|
533 | (12) |
|
|
533 | (4) |
|
|
537 | (1) |
|
|
538 | (1) |
|
|
538 | (1) |
|
|
538 | (4) |
|
|
542 | (3) |
|
Chapter 29 Database Security |
|
|
545 | (12) |
|
The Right Level of Security |
|
|
545 | (1) |
|
|
546 | (1) |
|
Single-Password Databases |
|
|
546 | (1) |
|
|
546 | (1) |
|
Operating System Passwords |
|
|
547 | (1) |
|
|
547 | (1) |
|
|
548 | (5) |
|
Initial Configuration and Privileges |
|
|
553 | (1) |
|
|
553 | (1) |
|
|
554 | (1) |
|
|
555 | (2) |
Appendix A Exercise Solutions |
|
557 | (92) |
Appendix B Sample Relational Designs |
|
649 | (22) |
Glossary |
|
671 | (12) |
Index |
|
683 | |