HotModellingConstraintsMigrationsBackupsIndexesRetirement
Latest The application will be rewritten twice. The data will still be there, and it will still have the shape you gave it.
The asymmetry

Schemas outlive the code that was written against them

Applications are replaced every few years. The data survives every replacement, carrying whatever decisions were made when nobody was paying much attention.

There is a reliable pattern in long-lived systems. The application gets rewritten: a new framework, a new language, a new team, a new front end. This happens perhaps every five to eight years, and each time it is treated as a substantial undertaking. The database is migrated across, largely unchanged, because changing it is harder than changing the code and because everything else depends on it. After two rewrites the schema is the oldest surviving artefact in the system, and it is carrying decisions made by somebody who left a decade ago.

This asymmetry should change how much care goes into each. A poor choice in application code is annoying and can be fixed by somebody willing to do the work, because the code has no state. A poor choice in a schema propagates: every application written against it inherits it, every report depends on it, every integration encodes it, and by the time somebody wants to change it there are eleven consumers nobody has a complete list of.

Continue reading

Shape

Identifiers that mean something will eventually be wrong

Every meaningful key encodes an assumption that changes.

Free text where a constrained set belongs

Status columns are where this happens most.

Change

Large tables need a different approach

An operation that is instant on a thousand rows locks a hundred million.

Dropping things safely

The consumer you did not know about is always the one that matters.

Operating

Indexes are a trade, not an improvement

Every one is paid for on every write.

Slow is usually one query, not the database

Measure before changing anything.

Over time

Retention is a design decision

Keeping everything forever is a choice with consequences.

The reporting copy that becomes a second system

It starts as a convenience and acquires dependents.

About Database XP

Database XP is about the parts of data work that outlive the applications built on them: schema decisions, constraints, migrations at scale, backups that have actually been restored, indexing trade-offs, and documenting meaning rather than structure.

The editorial position is that schemas outlast the code written against them by several rewrites, that the decisions which are expensive to reverse deserve disproportionate care, and that data integrity enforced only in an application will be bypassed by the second thing that writes to the database.

This publication is independent. It is not affiliated with any database vendor, cloud provider or tooling company, it does not accept payment for coverage, and it does not benchmark or rank products.

Articles describe general practice. Behaviour differs substantially between database engines and between versions, particularly for locking, index creation and schema changes at scale, and the documentation for the specific version you run is the authority. Data retention and privacy obligations differ by jurisdiction and should be established from the applicable law.