|
Agile Database Techniques: Effective Strategies for the Agile Software Developer |
5 |
|
|
Contents |
9 |
|
|
Foreword by Jon Kern |
19 |
|
|
Foreword by Douglas K. Barry |
21 |
|
|
Acknowledgments |
23 |
|
|
Introduction |
25 |
|
|
The Audience for This Book |
26 |
|
|
Why the Focus on Agile DBAs? |
27 |
|
|
An Overview |
27 |
|
|
About the Author |
29 |
|
|
Part One: Setting the Foundation |
31 |
|
|
Chapter 1: The Agile Data Method |
33 |
|
|
Why Working Together Is Currently Hard |
34 |
|
|
Detecting That You Have a Problem |
36 |
|
|
The Agile Movement |
37 |
|
|
The Philosophies of Agile Data |
40 |
|
|
Agile Data in a Nutshell |
41 |
|
|
Agile Software Developers |
46 |
|
|
Does Agile Data Solve Our Problems? |
47 |
|
|
Summary |
48 |
|
|
Chapter 2: From Use Cases to Databases — Real-World UML |
49 |
|
|
An Overview of Object-Oriented Concepts |
50 |
|
|
An Introduction to the Unified Modeling Language ( UML) |
53 |
|
|
A UML Profile for Data Modeling |
68 |
|
|
Summary |
80 |
|
|
Chapter 3: Data Modeling 101 |
81 |
|
|
The Role of the Agile DBA |
82 |
|
|
What Is Data Modeling? |
82 |
|
|
How to Model Data |
89 |
|
|
How to Become Better at Modeling Data |
97 |
|
|
Summary |
98 |
|
|
Chapter 4: Data Normalization |
99 |
|
|
Why Data Normalization? |
100 |
|
|
The Role of the Agile DBA |
100 |
|
|
The Rules of Data Normalization |
100 |
|
|
Summary |
107 |
|
|
Chapter 5: Class Normalization |
109 |
|
|
How Does Class Normalization Relate to Other Object Design Practices? |
110 |
|
|
The Role of the Agile DBA |
110 |
|
|
The Rules of Class Normalization |
110 |
|
|
Summary |
116 |
|
|
Chapter 6: Relational Database Technology, Like It or Not |
117 |
|
|
Relational Database Technology |
118 |
|
|
Coupling: Your Greatest Enemy |
122 |
|
|
Additional Challenges with Relational Databases |
125 |
|
|
Encapsulation: Your Greatest Ally |
126 |
|
|
Beyond Relational Databases: You Actually Have a Choice |
128 |
|
|
Summary |
133 |
|
|
Chapter 7: The Object-Relational Impedance Mismatch |
135 |
|
|
The Role of the Agile DBA |
136 |
|
|
The Technological Impedance Mismatch |
136 |
|
|
The Cultural Impedance Mismatch |
141 |
|
|
Summary |
143 |
|
|
Chapter 8: Legacy Databases — Everything You Need to Know But Are Afraid to Deal With |
145 |
|
|
The Role of the Agile DBA |
146 |
|
|
Sources of Legacy Data |
148 |
|
|
Understanding Common Problems with Legacy Data |
149 |
|
|
Strategies for Working with Legacy Data |
164 |
|
|
Data Integration Technologies |
171 |
|
|
Summary |
172 |
|
|
Part Two: Evolutionary Database Development |
173 |
|
|
Chapter 9: Vive L’ Évolution |
175 |
|
|
The Need for Methodological Flexibility |
176 |
|
|
Beware of Data-Oriented BDUF |
177 |
|
|
Evolutionary Development on a Project |
180 |
|
|
The “ Natural Order” of Things and Evolutionary Development |
183 |
|
|
Summary |
185 |
|
|
Chapter 10: Agile Model-Driven Development ( AMDD) |
187 |
|
|
The Role of the Agile DBA |
188 |
|
|
What Is Agile Modeling? |
188 |
|
|
When Is a Model Agile? |
193 |
|
|
What Is Agile Model-Driven Development ( AMDD)? |
193 |
|
|
Agile Documentation |
194 |
|
|
Summary |
196 |
|
|
Chapter 11: Test-Driven Development ( TDD) |
197 |
|
|
How Does TDD Work? |
198 |
|
|
The Steps of TDD |
198 |
|
|
TDD and Traditional Testing |
201 |
|
|
TDD and Documentation |
201 |
|
|
Test-Driven Database Development |
202 |
|
|
TDD and Agile Model-Driven Development ( AMDD) |
203 |
|
|
Summary |
204 |
|
|
Chapter 12: Database Refactoring |
205 |
|
|
Refactoring |
206 |
|
|
Database Refactoring |
207 |
|
|
Why Database Refactoring Is Hard |
209 |
|
|
How to Refactor Your Database |
212 |
|
|
Common Database Refactoring Smells |
222 |
|
|
Adopting Database Refactoring within Your Organization |
223 |
|
|
Database Refactoring Best Practices |
225 |
|
|
Database Refactoring in the Real World |
226 |
|
|
Summary |
227 |
|
|
Chapter 13: Database Encapsulation Strategies |
229 |
|
|
Database Encapsulation Layers |
230 |
|
|
The Role of the Agile DBA |
231 |
|
|
Encapsulation-Layer Architectures |
232 |
|
|
Encapsulation-Layer Implementation Strategies |
235 |
|
|
Marshaling and Data Validation |
250 |
|
|
Error Handling |
250 |
|
|
Summary |
251 |
|
|
Chapter 14: Mapping Objects to Relational Databases |
253 |
|
|
The Role of the Agile DBA |
254 |
|
|
Basic Mapping Concepts |
255 |
|
|
Mapping Inheritance Structures |
261 |
|
|
Mapping Object Relationships |
274 |
|
|
Mapping Class Scope Properties |
288 |
|
|
Why Data Schemas Shouldn’t Drive Object Schemas |
291 |
|
|
Implementation Impact on Your Objects |
294 |
|
|
Implications for the Model Driven Architecture ( MDA) |
295 |
|
|
Patternizing the Mappings |
296 |
|
|
Summary |
297 |
|
|
Chapter 15: Performance Tuning |
299 |
|
|
An Overview of Performance Tuning |
299 |
|
|
The Role of the Agile DBA |
301 |
|
|
Step One: Identify a Performance Problem |
301 |
|
|
Step Two: Profile the Problem |
301 |
|
|
Step Three: Tune the Problem Away |
303 |
|
|
Summary |
315 |
|
|
Chapter 16: Tools for Evolutionary Database Development |
317 |
|
|
Tools |
317 |
|
|
Sandboxes |
321 |
|
|
Scripts |
323 |
|
|
Summary |
324 |
|
|
Part Three: Practical Data-Oriented Development Techniques |
325 |
|
|
Chapter 17: Implementing Concurrency Control |
327 |
|
|
The Role of the Agile DBA |
328 |
|
|
Collisions |
328 |
|
|
Understanding Transactions |
333 |
|
|
Summary |
340 |
|
|
Chapter 18: Finding Objects in Relational Databases |
341 |
|
|
The Role of the Agile DBA |
341 |
|
|
Find Strategies |
342 |
|
|
Implementation Techniques |
347 |
|
|
Representing Find Results |
350 |
|
|
Summary |
354 |
|
|
Chapter 19: Implementing Referential Integrity and Shared Business Logic |
355 |
|
|
The Role of the Agile DBA |
356 |
|
|
How Object Technology Complicates Referential Integrity |
356 |
|
|
Where Should You Implement Referential Integrity? |
365 |
|
|
Summary |
372 |
|
|
Chapter 20: Implementing Security Access Control |
373 |
|
|
The Role of the Agile DBA |
374 |
|
|
Authentication |
374 |
|
|
Authorization |
375 |
|
|
Effective Security Strategies |
384 |
|
|
Summary |
386 |
|
|
Chapter 21: Implementing Reports |
387 |
|
|
The Role of the Agile DBA |
388 |
|
|
Database Deployment Architecture |
390 |
|
|
Reporting within Your Application |
392 |
|
|
Reporting outside Your Application |
395 |
|
|
Database Design Strategies |
395 |
|
|
Implementation Strategies |
396 |
|
|
Challenges That Make Reporting Hard |
397 |
|
|
Summary |
398 |
|
|
Chapter 22: Realistic XML |
399 |
|
|
The Role of the Agile DBA |
400 |
|
|
An XML Primer |
400 |
|
|
Practical Applications for XML |
404 |
|
|
Vocabularies |
405 |
|
|
How to Model XML |
406 |
|
|
XML Mapping and Data Binding |
410 |
|
|
How to Persist XML in Relational Databases |
412 |
|
|
How to Persist XML in XML Databases |
413 |
|
|
XML Development Strategies |
415 |
|
|
Summary |
416 |
|
|
Part Four: Adopting Agile Database Techniques |
417 |
|
|
Chapter 23: How You Can Become Agile |
419 |
|
|
You Don’t Have to Be Superhuman |
419 |
|
|
Agility Is Really Just a Mindset |
420 |
|
|
Become a Generalizing Specialist |
421 |
|
|
Summary |
423 |
|
|
Chapter 24: Bringing Agility into Your Organization |
425 |
|
|
Change the Way You Look at Software Development |
426 |
|
|
Understand the Challenges You Face |
427 |
|
|
Actually Try It |
429 |
|
|
Block Nonagile Coworkers |
429 |
|
|
Be Realistic |
430 |
|
|
Parting Thoughts |
431 |
|
|
Appendix: Database Refactoring Catalog |
433 |
|
|
References and Suggested Reading |
451 |
|
|
Index |
459 |
|