db.sb
db.sb is the one database behind api.sb, keeping every record and event of every Startup.
db.sb is the one database behind api.sb: every record, Relationship and Event of every Startup, kept forever.
What it does
Each Startup gets its own owner database: one writer, strongly consistent, every read seeing the last write. Every Event also lands in an analytics store, append-only, so Metrics, Dashboards and Portfolio queries never slow a write.
| Holds | What it is | Written by |
|---|---|---|
| Things | Every record, typed by one or more Nouns, at its current state | Create and update |
| Relationships | Named links between Things, read from both ends | Any Verb that links |
| Events | The immutable history of every change | Every Action |
| Tenants | One partition per Customer inside the Startup's database | Tenant.provision |
db.sb is the only source of truth. Search indexes, caches, edge copies and relational views are projections rebuilt from it, so losing one loses nothing. A store that the record cannot rebuild is refused.
Nothing is forgotten. A delete is a marker that hides a Thing from reads and keeps its Events, and any Thing reads back as of a past moment.
Every Thing has one file form: YAML frontmatter for its data and an MDX body for its content. Git imports and exports that form, and db.sb stays the record. A repository is either db-first, with git a rebuildable copy, or git-first, with each commit imported as a Change.
One owner database carries about 1,000 writes a second. Past that, a Collection shards by key under the same ids.
A read can also resolve. Thing.resolve finds the one Thing that matches a shape, or creates it, and says which it did.
Built from
None.
Surfaces
- api.sb is the only way to read or write db.sb, so every write is a checked, attributed Action.
- Point-in-time reads pass
atto any get, or append@and a time or Version to a record URL:GET /orders/.order_1@2026-10-01 - Analytics queries run over the Event store through
Collection.query, on every Interface. npx startup-builder show /orders --output mdprints the file form of a Collection;Startup.importreads it back.
Next steps
- Database: Nouns, Things, Collections and Versions in depth.
- Search and KV and cache: two projections of db.sb.
- The response envelope: what a read returns.