MiniCTRMSearch

MiniCTRM - Build Tutorial 643: Relational or not: deals in tables and columns, or deals as documents

→ to begin · N for the speaker notes

On a phone: Next or a swipe left to begin, Notes for the words.

What you'll learn

The decision written down with its costs, a measured comparison of the same report and the same query on deals stored both ways, the rules that keep the deal in columns, and, where documents are right, a document store kept beside the tables rather than instead of them.

  • Why MiniCTRM keeps deals in columns – MiniCTRM's view of document storage, the rules that encode it, and where MiniCTRM does pack data.
  • What you need first – The three lessons this one builds on, and why to take it before the first deal migration.
  • The trade-off – Ten questions answered for tables and for documents, and the three downsides with examples.
  • Write the decision down – An ADR with the trade-off table and three lines in CLAUDE.md.
  • Measure it – The same three questions on deals stored both ways, timed, with the experiment thrown away.
  • Where a document is right – Raw messages, scenario vectors and rendered text beside the tables, and a test that keeps JSON off the deal.
  • Ship it – /ship, with the schema-scan test among the rest.
  • How MiniCTRM did it – The Data Model drawn from the live schema, and one SELECT on the SQL Query screen.

Before you start

The lessons this one builds on: 514 Choosing the database: SQLite first, PostgreSQL later; migrations only, 522 Designing the deal model: how to tell Claude what you want, 601 Valuation and reports: mark-to-market, valuation runs, position, day-over-day change.

Copyright 2026-2027 Brian Shydlo. MiniCTRM is source-available under the PolyForm Strict License 1.0.0 (https://polyformproject.org/licenses/strict/1.0.0): free for learning and other noncommercial use; no changes and no redistribution; commercial use needs permission.

Welcome

Two ways to keep a deal

1 / 12
Two ways to keep a deal
Why MiniCTRM keeps deals in columns

Why MiniCTRM keeps deals in columns

2 / 12
Why MiniCTRM keeps deals in columns
What you need first

What you need first

3 / 12
What you need first
The trade-off

Ten questions, two answers

4 / 12
Ten questions, two answers
The trade-off

The three downsides, with examples

5 / 12
The three downsides, with examples
Write the decision down

Write the decision down

6 / 12
Write the decision down
Measure it

Measure it, then throw it away

7 / 12
Measure it, then throw it away
Where a document is right

Where a document is right

8 / 12
Where a document is right
Ship it

Ship it

9 / 12
Ship it
How MiniCTRM did it

The deal model, drawn from the schema

10 / 12
The deal model, drawn from the schema
How MiniCTRM did it

One SELECT on the SQL Query screen

11 / 12
One SELECT on the SQL Query screen
What you have now

What you have now

12 / 12
What you have now

You have finished lesson 643, Relational or not: deals in tables and columns, or deals as documents.

Where next?

← → move · N notes · Home / End