Engineering the Future of Software
November 13–14, 2016: Training
November 14–16, 2016: Tutorials & Conference
San Francisco, CA

Evolutionary database design: Refactoring databases

Pramod Sadalage (ThoughtWorks)
1:30pm–5:00pm Monday, 11/14/2016
Fundamentals
Location: California West Level: Beginner
Average rating: ****.
(4.50, 2 ratings)

Prerequisite knowledge

  • An understanding of software development, build scripts, SQL, and Agile development methods

Materials or downloads needed in advance

  • A laptop with enough computing and disk space to run a database server using Vagrant and build scripts using Java (Tutorial code will be shared on GitHub.)

What you'll learn

  • Learn how to refactor databases
  • Explore techniques for refactoring databases without causing legacy applications to fail
  • Understand how to improve team productivity and improve the ability to deploy multiple releases along with database changes
  • Learn how to integrate data developers, DBAs, and developers, apply version control techniques to databases, and split legacy databases when migrating from monolith to microservices

Description

Over the life of an application, as requirements change, application usage patterns alter, load and performance changes, and monolith applications may get broken into microservices. The need to change database and database architecture is inevitable and may include architectural refactoring, structural refactoring, data quality refactoring, referential integrity refactoring, and database code refactoring. Pramod Sadalage discusses evolutionary database design, database refactoring patterns, and different implementation techniques to enable blue-green deployments, allow for legacy applications to work with fast changing database, and enable teams to effectively refactor the database to fulfill the changing needs of the organization.

Pramod dives into 10 patterns, for each, explaining how to apply changes, version control the changes, migrate the data, and integrate with the rest of the team and their changes.

The patterns include:

  • Encapsulate table with view
  • Migrate method from database
  • Replace method with views
  • Introduce read-only table
  • Split table
  • Make column non-nullable
  • Drop column
  • Add foreign key constraint
  • Merge columns
  • Replace columns
Photo of Pramod Sadalage

Pramod Sadalage

ThoughtWorks

Pramod Sadalage is a director at ThoughtWorks, where he enjoys the rare role of bridging the divide between database professionals and application developers. Pramod is usually sent in to clients with particularly challenging data needs that require new technologies and techniques. In the early ’00s he developed techniques to allow relational databases to be designed in an evolutionary manner based on version-controlled schema migrations. Pramod is the coauthor of Refactoring Databases and NoSQL Distilled and the author of Recipes for Continuous Database Integration, and he often speaks and writes about the insights he and his clients learn.

Comments on this page are now closed.

Comments

Picture of Pramod Sadalage
Pramod Sadalage
08/23/2016 12:42pm PDT

@Adam The approach and techniques and going to be technology agnostic, the examples will use oracle/vagrant/java. You can lean many techniques without doing the exercises, better yet if you have a preferred tech stack that you want to work with, please bring it along so we can discuss how the same principles and techniques apply in a different tech stack.

Adam Josephson
08/23/2016 10:10am PDT

I am very interested in the approach and techniques covered in this course. But am not interested in applying these using the technologies that are listed: Vagrant/Oracle/Java. Would this session still provide value if I were not participating with the required materials?