Skip to content

ADR: One SQL database, one schema per area

ADR: One SQL database, one schema per area

Status: accepted, 2026-11-16, at 1.0.5.54. TheYard runs on one Azure SQL database, sqldb-theyard-ss-basic on the server sql-theyard-ss-westus3, and every area that keeps relational data keeps it in a schema of its own inside that database: the site's tables in dbo, the blog in blog, the campaign in campaign, the campaign card's view in card, the tracker in jobhunt and the network in network. A new area adds a schema, never a database. The rule is Steve's, given on 15 November: one database with a schema per area, and more than one database is a red flag.

Reading list

  1. ADR: The SQL Server backend: why the site has a relational store at all, and the addendum that moved it onto the Basic database.
  2. ADR: Data first, and the database in source control: the schema as a project in the repository, which is where each area's schema lives.
  3. ADR: Unused resources are deleted: the rule that deleted the paused serverless database.
  4. ADR: The campaign sends, the model writes rows: the addendum that folded the campaign's own database into the site's as schemas.

In plain words

Everything the site and the job hunt keep in SQL lives in one database, and each part of the work has its own named section inside it (a schema), so the blog's tables, the campaign's tables and the tracker's tables never mix, and each process may sign in only to the sections it needs.

What that is worth: one database costs $4.90 a month on the Basic tier, and a second one would cost the same again for no gain; there is one thing to back up, one firewall and one set of sign-ins, and a test fails the build before a second database can be added by accident.

Context

The site has run two databases twice and gone back to one both times. The free serverless database beside the Basic one spent its month's allowance in two weeks and was paused, then deleted on 19 October under ADR-106. The campaign was given a Basic database of its own on 24 October so that a deploy of it touched nothing else, and on 25 October, on Steve's ask, its tables moved into the site's database as the campaign and card schemas, with the tracker's tables beside them in jobhunt, and that database was deleted (ADR-118, the addendum of 1.0.4.72).

So one database has been the practice since 25 October, but no record said it was the rule, and Azure's own cost view still counted three databases on 15 November, because both deletes fall inside its thirty-day window. Steve ruled that day that the answer is one database with a schema per area. Read live on 16 November at 08:08 Central (az sql server list, az sql db list on every server): the subscription has one SQL server, sql-theyard-ss-westus3, holding master and sqldb-theyard-ss-basic on the Basic tier, and nothing else.

Decision

  1. One database. sqldb-theyard-ss-basic on sql-theyard-ss-westus3 is the only SQL database. master is the server's own and is not counted.
  2. One schema per area. The site's tables stay in dbo (api/TheYard.Database); the blog's in blog (the same project); the campaign, its card, the tracker and the network in campaign, card, jobhunt and network (functions/JobHunt.Database). A new area adds a CREATE SCHEMA to the project that owns it.
  3. Access is by schema, not by database. Each process signs in as its own identity and is granted only the schemas it uses, as ADR-118's addendum set out: the Function's user reaches the job hunt's schemas only, and the site's identity is denied campaign and jobhunt and may read card.
  4. No template declares the database. The database was made by hand and is read by name. A database name reaches Azure only through three kinds of value, so those are what is held: each template's parameter default for the Initial Catalog (sqlDatabase in infra/appservice.bicep, campaignSqlDatabase in infra/jobhunt.bicep), the deploy's SQL_DB, and the names the Admin cards read it by (Azure.Resources.SqlDatabase and CampaignDatabase in the site's settings).

What holds it

OneSqlDatabaseTests: no template under infra/ declares a Microsoft.Sql/servers/databases resource or a child database of a server; every Initial Catalog in a template reads a parameter whose default is the one database, and the site's and the job hunt's templates are both among them; every Initial Catalog in a workflow reads a variable that workflow sets to the one database; and every database name written in full in a template, a workflow or a settings file is the one database.

Consequences

  • A change that needs separate data for a new area writes a schema and a grant, not a database and a connection string. If one area ever outgrows the Basic tier's 2 GB, the tier of the one database moves, and that is a decision for Steve with its cost written here first.
  • A deploy of one area's schema reaches the same database as every other area's. That is the cost ADR-118's first decision avoided, and Steve accepted it on 25 October: a schema project publishes only its own objects, and each identity can touch only its own schemas.
  • Azure's cost view keeps counting the two deleted databases until its window passes 25 October; the Admin cards read the live list, which shows one.

Where it sits

Outside the rings. The rule is about the Azure resources and the templates and workflows that name them; the code in Infrastructure takes its connection string from configuration and does not know how many databases exist. The schemas themselves sit in the two database projects beside the code that owns each area.

Files

Enforced by

One rule in the rulebook cites this record, each held by a test on every release.

The rule What holds it In the last gate
TheYard keeps one SQL database: no template declares one, and every Initial Catalog a template or a workflow builds, and every database name a template, workflow or settings file writes, is sqldb-theyard-ss-basic OneSqlDatabaseTests 8 of 8 passed
Store

The Yard, home

Steven StoutStaff .NET engineerRemote

Production .NET that stays up. Built with AI, measured on every version.

Steven Stout

Hi, I'm Steve. I build the systems that make delivery boring in the best way, then coach people inside them.

  • 200+

    production releases, none took the platform down

    Conway Investment Research, 2019 to 2024. Sole engineer for the first three years on a live financial advisory platform.

    See how
  • 50%

    shorter release cycle

    Storee Construction, 2024 to 2026. Four ASP.NET applications onto one .NET 10 platform on Azure, with a four-person team I hired and mentored.

    See how

01Verified

Steven Stout

A real person, and the work is mine.

  • Identity

    Checked by LinkedIn, not by me.

    LinkedIn verified my government ID.

  • Running system

    You are looking at it.

    Version 1.0.5.273 is live. Nothing ships unless it passes the automated gates first.

That's who I am. Here's how I work.

02Strengths

Ten strengths, each with the proof beside it. The numbers match my resume and LinkedIn, and the live ones are read from this site as you look.

  • 01

    Keeps production alive

    200+ releases on a live financial platform, and none took it down. Sole engineer for the first three years.

    See the Conway work

  • 02

    Simplifies messy systems

    Four ASP.NET applications onto one .NET 10 platform on Azure, and a release cycle 50% shorter.

    See the Storee work

  • 03

    Marries dev and infrastructure

    Blue-green releases at Storee that flipped in about 5 seconds with nobody signed out, and Azure Front Door at two employers.

    See this site's cloud

  • 04

    Designs data that holds up

    White-label clients on one shared database, the isolation built into the data, and no cross-client issues.

    See the Conway work

  • 05

    Keeps AI-written code honest

    15 quality numbers that may only improve: 273 releases in a row with none worse.

    See the quality numbers

  • 06

    Resourceful

    $30,000+ cut from Azure and vendor spend at Conway. This site's Azure bill is public, resource by resource.

    See the bill

  • 07

    Builds people up

    Hired and mentored a four-person team. 13 colleagues recommend me by name.

    Read the recommendations

  • 08

    Takes ideas to production

    This site: designed, built and run solo, with 352 versions measured through one gate.

    How it was built

  • 09

    Writes clearly

    Posts on real engineering problems, in plain words.

    Read the blog

  • 10

    Owns decisions

    153 decision records, each with its tradeoff and the call I made.

    See the decision records

Built with AI. Gated so quality never slides.

Steven Stout’s showcase: a used-vehicle auction on .NET and React, built and run by one engineer, live on Azure, with its decisions written down.

No quality number has gotten worse at any release since 1.0.5.1 on 10 November: 273 releases in a row.

One engineer, an AI agent and a gate that checks 15 quality numbers on every release. 352 versions measured, with every result public, the worst days included.

82 releases in the last 7 days, each through the same gate.

Async methods with no CancellationToken, may only fall

11091.0.3.1391.0.5.2731.0.4.115, the ratchet
Every number, on the Quality page

TheYard, right nowLive

Answering in

unread

02505007501,000

server time at p95, the usual five minutes of the last day.

Azure this month

unread

the bill, by resource, read from Azure. The Admin tab shows every line.

Since the last roll

unread

 

rolled in place by the pipeline, behind one gate.

People who have visited

unread

30 days agotoday

Scanners, my own tools' and my own reads left out.

03Start here

04Where teams are heading

How I see engineering with AI, and the setup on this site that backs it.

AI-augmented teams · Architecture and ownership

AI writes more of the code. Someone still has to own what ships.

Teams are going to be heavily AI-augmented. That moves the senior job toward architecture and technical ownership: deciding what to build in pieces small enough to verify, and owning what ships.

  • Task tracking will get automated too. Judgment stays human: seeing a design fail at scale before it does.
  • On this site the AI's first design held the whole catalogue in memory. I caught it when the App Service plan hit 82 per cent and moved the work to the store.

What the AI wrote, what I decided

07Tech stack

  •    
  •    
  •    

Read from the build, never typed by hand

What TheYard runs on

What we use, where it runs, its AWS twin, the version as built, and the file that proves it.

Cloud patterns, not one vendor: every Azure piece in this stack has a named AWS twin. Mapped, not yet run on AWS.

  • .NET 1114 projects
  • React 19.3TypeScript 7.0
  • Azure9 Bicep files
  • 11GitHub Actions workflows
The whole stack, with the file that proves each line

The last release the gate stopped was 1.0.5.258 on 2 December, at its browser 1 of 2 job.

08How it is built

09How it is run

10Who and why

Next step

11What has to work, where is it today, and what does success look like?

Book 20 minutes opens an email to me with those three questions in it, and I answer with a time.

Book 20 minutes

Your email app should have opened with this message. If it did not, copy it and send it from any mailbox.

Or message me on LinkedIn