Skip to content
GabineteTools for thinking

No. 0604Workflow and delivery

Evolutionary Database Design

Sadalage and Fowler · 2003

Three equal wooden trays; in each one a bluish green compartment is added, stones are moved and the old compartment is removed.

The table / Model card · No. 0604 · Workflow and delivery

Evolutionary Database Design

Evolve a database schema in small, tested, versioned migrations alongside the application code, instead of designing it fully upfront.

The essentials

What it is

What it solves

How can a team change a database schema repeatedly during development and after release without breaking data, other teams or deployments?

When to use it

Agile products where requirements change during delivery. Teams that deploy often and need schema and code released together. Legacy databases that must be refactored without a big-bang rewrite.

Where it comes from

Pramod Sadalage developed the techniques at ThoughtWorks from 2000; he and Martin Fowler published the article 'Evolutionary Database Design' in January 2003 (rewritten May 2016), and the book Refactoring Databases (Ambler and Sadalage) followed in 2006.

Martin Fowler and Pramod Sadalage · 2003

How it works

Every schema change is a small migration script stored in version control with the code. Developers each have their own database copy and apply the same scripts. Automated tests and a continuous integration build run the migrations from scratch and against production-like data. Changes needing compatibility are split into steps, such as adding a new column, copying data, then removing the old one later. This keeps the schema continuously deployable.

You need

Version-controlled migration tooling, a continuous integration pipeline, a test database with representative data, and agreement between developers and DBAs.

You get

An ordered set of migration scripts, a database buildable from zero, and automated tests proving each change.

Case

Illustrative case

Bluepeak Insurance needed to split a 'customer name' column into first and last names while 40 services read it. The team added two new columns and a trigger keeping them synced with the old one, with each change as a numbered migration. Services moved to the new columns over six weeks, each release tested against a copy of production. Once monitoring showed no reads of the old column, a final migration dropped it. No downtime occurred and the sequence was repeated for later refactorings using the same template.

A fictional company used to explain the model.

Caution

When to avoid it

  • Schemas shared by many external consumers who cannot adapt on your timetable.
  • Very large datasets where each migration takes hours without special tooling.
  • Teams with no automated testing.

Common mistakes

  • Making large migrations that mix many changes.
  • Editing a migration that already ran elsewhere.
  • Dropping old columns before consumers have moved.
  • Leaving DBAs out of the process.

Known weaknesses

  • Needs strong test automation and discipline
  • Compatibility steps lengthen each change
  • Data-heavy migrations can be slow on big tables
  • Many accumulated migrations need periodic consolidation

How to apply it in 5 steps

How to apply it

Evolutionary Database Design

5 steps

Use the arrow keys to move between steps, Home and End for the first and last, and Enter to fold or unfold the booklet.

View all 5 steps
  1. Put the schema in version control

    Store the baseline schema and every change as ordered scripts alongside the code.

  2. Give each developer a database

    Let everyone build and migrate their own copy from the scripts.

  3. Make small refactorings

    Apply one schema change at a time, using expand-then-contract for compatibility.

  4. Test automatically

    Run all migrations from scratch in CI and test against production-like data.

  5. Deploy through the pipeline

    Release schema and code together with the same automated process.

Which decisions it helps with

Decision profile

A phased process to take action on processes and operations.

Keyboard: Tab to the sheet, use the arrows to explore the assessments and their questions, and press Escape to close the note.

IIdentity

Type of tool
Phased process
Decision stage
Plan the work, roles and deadlinesalso: generate ideas or options (27 %)
What it applies to
Processes and operationsalso: a product or service (47 %)
Discipline
Agile and software development
What it produces
A sequence of phases completed in order

IIIResources required

  • TimeWeeks or months
  • PeopleA small group (2 to 8)
  • DataBetween “none: experience is enough” and “a few readily available facts”
  • ExpertiseWorks best with a facilitator
  • Time horizonDays or weeks
  • ScopeOne team
  • FrequencyA regular practice
The team’s own knowledge is enough

IITen axes

The dot shows which end the model favours. A hollow dot means no clear preference.

  • DirectionExecution
  • Top-downBottom-up
  • PeopleProcesses
  • Generate optionsNarrow down options
  • Step-by-step analysisIntuition and experience
  • A strict sequence of stepsA flexible framework
  • Protect what we haveTake a risk
  • Improve what we haveFundamental change
  • Inside the organisationOutside the organisation
  • Understand firstAct now

IVUseful when

Applicable traits

  • How it supports actionDecide what comes first
How was this profile calculated?

An automated system reads each model card and answers the same questions for every model. This profile has answers for 77 of 77. No answers are entered by hand.

A very high probability counts as “yes” and a very low one as “no”. Intermediate answers are hidden.

On the axes, mixed means the model favours neither end.

How it works →

Thinking space

Workflow and delivery

They organize and accelerate day-to-day delivery: Kanban, DevOps, development cycles, automation and work standards.

Membership: 26 % · also “Learning, coaching and goal setting” (13 %)

View in the atlas of spaces →

Each point is a model. Distance reflects answers to the decision questions. Light points share this model’s space.

Similar models

Verified sources

Use the arrow keys to move between sources.

Original work

  1. Sadalage, P. and Fowler, M. (2003). Evolutionary Database Design. martinfowler.com.Original article (Jan 2003, rewritten May 2016) describing the practice Sadalage developed at ThoughtWorks.View source: Evolutionary Database Design (opens in a new tab) ↗

Key development

  1. Ambler, S. W. and Sadalage, P. J. (2006). Refactoring Databases: Evolutionary Database Design. Addison-Wesley.Book-length catalogue of database refactorings the article points to.View source: Refactoring Databases: Evolutionary Database Design (opens in a new tab) ↗

The catalogue does not yet list a published critique of this specific model.

Wikipedia article (opens in a new tab) ↗