Scrivio Interview library
LeadershipPrincipal7 min read · updated 12 November 2026

A ten-year-old monolith's schema has 900 tables used by 40 teams and no one can change core tables safely. What long-term strategy would you set?

I would set a multi-year strategy that makes core tables changeable again by first making their ownership and their users visible. Map every table to an owning team, put the core tables behind APIs or views so their physical structure can change without breaking 40 teams, and then move domains gradually into their own schemas or databases. Alongside that, invest in migration tooling, linting and production-sized test environments, and measure progress by how many teams can change their data independently.

Why this question is asked

A schema that no one dares to change is one of the most expensive problems a company can have, and it is rarely visible on a roadmap. Every new feature that needs a change to a core table becomes a cross-team negotiation, so teams work around it with new side tables, JSON columns and duplicated data, which makes the schema even harder to change. Interviewers ask this question at the most senior level because there is no quick fix; the answer is a strategy that has to survive several years and many reorganisations. In this answer, we will look at why the schema became frozen, then go through ownership mapping, interfaces in front of core tables, gradual splitting, the tooling investment, and how to measure progress.

1Why Nobody Can Change the Core Tables

A table can be changed safely when someone knows everything that depends on it. In a ten-year-old monolith with 900 tables and 40 teams, nobody does. A core table such as customer or orders is read by dozens of modules, written by several, used in reports, batch jobs and other teams' native queries, and perhaps read directly by a data warehouse. Any change, even adding a constraint, might break something nobody remembers.

The real problem is therefore not the database technology but coupling and missing ownership. Every team can reach every table, and no team is responsible for any of them. The strategy has to change both, slowly, while the business keeps running.

2Map Ownership of Every Table

The first step is unglamorous: build a catalogue that assigns each of the 900 tables to one owning team. We start from evidence rather than opinion. Code ownership shows which modules write each table, query logs or pg_stat_statements show which services and users read it, and the history of changes shows who usually modifies it. A table with one writer usually belongs to that writer's team.

Tables that no one claims are the main risk, because they are the ones where nobody will notice a break, and they often turn out to be the most shared. Each unowned table gets an owner assigned explicitly, even if the first decision that owner makes is to mark it for removal. After a few months, the catalogue tells every engineer whom to ask before changing a table, which alone makes many changes possible again.

3Put Core Tables Behind Interfaces

Once a core table has an owner, the next step is to stop other teams depending on its physical structure. Instead of reading and writing the table directly, other teams use an interface the owning team controls: an API in the owning module or service, a database view designed for readers, or events published when the data changes. The owner can then change columns, split the table or move it, and only has to keep the interface stable.

SQL
-- Readers use a view the owning team maintains; the table behind it can change
CREATE VIEW customer_v1 AS
SELECT id, full_name AS name, email, country_code
FROM customer_core c JOIN customer_contact k ON k.customer_id = c.id;
-- Other teams: SELECT name, email FROM customer_v1 WHERE id = ? (unchanged when the tables change)
Step throughTarget shape for a core table
  1. 40 consuming teamsuse only the interface
  2. Interface owned by one teamAPI, versioned view, or events
  3. Owning team's schemafree to change behind the interface
  4. Databaseshared at first, separate later

4 layers, from the top down. Step through them one at a time.

Ownership plus an interface turns a frozen table into one the owner can change.

Notice that the view keeps the old column name, name, even though the owning team has already split and renamed the underlying data. Views are a cheap first step inside a shared database; APIs and events are the stronger form, because they also let the data move to another database later. Writes should go through the owner's code as early as possible, since shared writers are what make invariants impossible to protect.

4Split Ownership Gradually

With ownership and interfaces in place, we can move domains into their own schemas, and later their own databases, one at a time. A typical order is to pick a domain with a clear boundary and a motivated team, move its tables into a schema only that team's code may write to, enforce that with database permissions, and remove the last direct accesses from other teams. Only when the schema is truly isolated is a separate database worth considering.

This is deliberately a series of small, reversible moves rather than a big rewrite. Each move delivers value on its own, because that team can now change its tables freely, and the risk of any single move is limited. A grand plan to split the whole monolith in one programme usually stalls after a year with nothing finished.

5Invest in Migration Tooling and Realistic Test Environments

Teams will only change core tables if changing them is safe. So in parallel we invest in the platform: one migration tool with shared CI templates, a linter that catches dangerous operations, a framework for throttled backfills, and a CI job that tests the previous release against the new schema. Most important for a schema this old is a test environment with production-like data volumes, built from a masked copy of production, because a migration that takes one second on test data may take an hour on a 2-billion-row table.

This investment pays back across all 40 teams, and it is what turns the strategy from a plan into something teams can act on. Without it, ownership and interfaces only tell people that they may change their tables, not that they can do it without causing an outage.

6Accept a Multi-Year Plan and Measure the Right Thing

A schema that took ten years to become frozen will not be fixed in one. We say this openly at the start, to set expectations with leadership, and we plan in yearly stages: ownership and visibility in the first year, interfaces for the top 20 core tables and the tooling in the second, domain schemas for the first several teams after that.

Progress is measured by outcomes, not by activity. The headline metric is the number of teams that can change their own data independently, without coordinating with other teams, rising from perhaps 3 of 40 today toward most of them. Supporting metrics are the share of tables with an owner, the number of direct cross-team accesses to core tables, and the lead time for a schema change on a core table. These numbers keep the programme honest when priorities change.

7Follow-up questions

Should we move to microservices with a database per service?

Perhaps eventually for some domains, but not as the strategy itself. The value comes from ownership and stable interfaces, which can be achieved inside the monolith and one shared database first. Separate databases are the last step for domains that are already isolated, not the first step for everything.

How do you handle the data warehouse that reads tables directly?

It is one of the consumers that needs an interface. A common approach is to give it change data capture streams or published events in a documented format, owned by the domain teams, instead of direct table reads, so the operational schema can change without breaking reports.

What do you do in the first month?

Start the ownership catalogue from query logs and code, identify the five most painful core tables from recent incidents and blocked projects, and choose one domain team willing to be the pilot for interfaces and a separate schema. Early visible success makes the rest of the plan easier to fund.

8Conclusion

In this answer, we set a long-term strategy for a frozen 900-table schema shared by 40 teams. We map ownership of every table and treat unowned tables as the main risk, put core tables behind APIs, views or events so their structure can change, split domains gradually into their own schemas and later databases, invest in migration tooling, linting and production-sized test environments, and measure progress over several years by the number of teams able to change their data independently.

What to say in the interviewAbout 90 seconds aloud

Open with

The root problem is not the database, it is coupling and missing ownership: 40 teams can read and write 900 tables, and nobody knows everything that depends on a core table, so nobody can change it.

Then, if they want more

So my strategy starts with visibility. I would build a catalogue mapping every table to one owning team, using code ownership, query logs and change history as evidence, and treat unowned tables as the biggest risk.

Then, for the core tables, I would put an interface in front of them that the owning team controls: an API, a versioned view for readers, or published events, so the owner can change the physical structure while other teams keep a stable contract. Writes should move behind the owner first, because shared writers make invariants impossible.

After that, we move domains gradually into their own schemas, enforced with database permissions, and only later into their own databases, one domain at a time with a willing team, rather than a big-bang split.

In parallel I would invest in the platform, a single migration tool, linting, a backfill framework, backward compatibility tests and a production-sized masked test environment, so changes are safe as well as allowed.

I would be honest that this is a multi-year plan and measure it by how many teams can change their own data independently, plus the share of owned tables and the lead time for a core schema change.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "A ten-year-old monolith's schema has 900 tables used by 40 teams and no one can change...": https://scrivio-interview-library.netlify.app/databases/schema-migration/6064972059/