Test-Driven Database Development: Unlocking Agility

Book description

The practice of Test-Driven Development (TDD) has helped thousands of software developers improve quality, agility, productivity, and speed. In Test-Driven Database Development, Max Guernsey, III shows how to adapt TDD to achieve the same powerful benefits in database design and development.

Guernsey first explains why TDD offers so much potential to database practitioners, and how to overcome obstacles such as the lack of conventional “testable classes.” You’ll learn how to use “classes of databases” to manage change more effectively; how to define testable database behaviors; how to maximize long-term maintainability by limiting a database’s current scope; and how to use “emergent design” to simplify future expansion.

Building on this foundation, the author guides you through implementing modern TDD processes and database refactoring. He presents practical techniques for improving legacy databases; for deviating from strict TDD when necessary; and for adapting TDD to applications that persist data in file systems, XML, or serialized objects. Guernsey shows how to

•  Build a simple infrastructure to track and standardize scripts and databases
•  Define a sustainable TDD process for database design
•  Safely change a design without losing data
•  Design new databases that are lighter, leaner, simpler, more testable, and easier to change
•  Reduce design costs by eliminating duplication
•  Gradually bring the benefits of TDD, agility, and modern design to legacy databases
•  Remediate errors that find their way into database designs
•  Isolate behaviors and avoid unwanted dependencies that cause tests to fail

With this book as a guide, you will learn how to apply the proven practice of TDD to your database needs, and organize and optimize your organization’s data for a significant competitive advantage.

Test-Driven Database Developmentis the newest title in the highly respected NetObjectives Lean-Agile Series.

Table of contents

  1. Title Page
  2. Copyright Page
  3. Dedication Page
  4. Contents at a Glance
  5. Contents
  6. Foreword
  7. Preface
    1. Who Should Read This Book
    2. What Needs to Be Done
    3. Enabling Emergent Design
    4. Modernizing Development
    5. Chapter-by-Chapter Breakdown
    6. Downloadable Code
  8. Acknowledgments
  9. About the Author
  10. Chapter 1. Why, Who, and What
    1. Why
    2. Who
    3. What
    4. Summary
  11. Chapter 2. Establishing a Class of Databases
    1. The Class’s Role in TDD
    2. Classes in Object-Oriented Programming Languages
    3. Classes of Databases
    4. Incremental Build
    5. Implementation
    6. Summary
  12. Chapter 3. A Little TDD
    1. The Test-First Technique
    2. Tests as Specifications
    3. Building Good Specifications
    4. Summary
  13. Chapter 4. Safely Changing Design
    1. What Is Safe?
    2. Solution: Transition Testing
    3. Transition Safeguards
    4. Summary
  14. Chapter 5. Enforcing Interface
    1. Interface Strength
    2. Client-Object-Like Enforcement
    3. Sticking Point: Change
    4. Sticking Point: Coupling
    5. Summary
  15. Chapter 6. Defining Behaviors
    1. A New Group of Problems
    2. Knowledge, Information, and Behavior
    3. Outside-In Development
    4. Justification by Specification
    5. Summary
  16. Chapter 7. Building for Maintainability
    1. Never Worry About the Future
    2. Guard Knowledge with Fervor and Zeal
    3. Deal with the Future When It Happens
    4. Summary
  17. Chapter 8. Error and Remediation
    1. Kinds of Errors
    2. Dealing with Good Errors
    3. Dealing with Bad Errors
    4. Summary
  18. Chapter 9. Design
    1. Structures Versus Design
    2. What Is Design?
    3. Composition and Aggregation
    4. Reuse
    5. Abstraction
    6. Summary
  19. Chapter 10. Mocking
    1. Testing Individual Behaviors
    2. Mocking in Object-Oriented Programming
    3. Mocking in Database Design
    4. Summary
  20. Chapter 11. Refactoring
    1. What Refactoring Is
    2. Lower and Higher Risk Design Changes
    3. Summary
  21. Chapter 12. Legacy Databases
    1. Promoting to a Class
    2. Controlling Coupling
    3. Controlling Change
    4. Finding Seams and Components
    5. Summary
  22. Chapter 13. The Façade Pattern
    1. Encapsulation with a Façade
    2. Strangling the Old Interface
    3. Test-Driving Behaviors in the Façade Database
    4. Summary
  23. Chapter 14. Variations
    1. Having a Class Is Important—Implementation Is Not
    2. Scenario: Skipping Steps
    3. Scenario: Deviations
    4. Common Solution
    5. Summary
  24. Chapter 15. Other Applications
    1. XML
    2. File Systems and Other Object Directories
    3. Data Objects
    4. Summary and Send Off
  25. Index
  26. Ad Pages

Product information

  • Title: Test-Driven Database Development: Unlocking Agility
  • Author(s): Max Guernsey III
  • Release date: February 2013
  • Publisher(s): Addison-Wesley Professional
  • ISBN: 9780132776486