B2.5 · dive 2 — the supersession, performed
Codd's procedure, on stage.
Chapter 2.2 shipped the balance's embedded positions map labeled interim, superseded by 2.5; gate E3 strikes it out and copies the keys down, and the label is paid. The rung does something no previous rung has done: it executes a supersession on stage.
Source: content/bcs2.5.md, quoting bcs_rung_2_5_check.out; the superseded
representation's receipt is split across two documents — Chapter 2.2's label, this rung's E3.
The transcript
bcs_rung_2_5_check.out · verbatim · this dive reads E3boot: the holds relation is its own system -- PRT subjects, AST objects, indexes private E1 surface ok -- the relation's surface: link, unlink, props, from, to, degree -- and its indexes are nobody's business E2 gates ok -- both ends gated: subject must be PRT, object must be AST -- {:error, :namespace} on either violation E3 retire ok -- the interim representation retired: positions struck out of the balance row and copied down as edges -- the 2.2 label is paid E4 traverse ok -- forward 200 ascending with a 10-edge page head; reverse finds all 50 holders, ascending E5 unlink ok -- unlink removes both directions atomically: degree 199; the reverse index no longer lists the subject PASS 5/5
The procedure is his, step for step
content/bcs2.5.md · Why · WhatThe lineage of the fix is the oldest citation in this series: Codd's 1970 model treats a data bank as “a collection of time-varying relations”, and his normalization procedure is literally the E3 gate — strike the nonsimple domain out of the parent relation, copy the parent's key down into the promoted one. Fifty-six years later the parent is a balance row, the nonsimple domain is a positions map, and the promoted relation is a supervised process — but the procedure is his, step for step.
Why the embedded form had to go: who holds ESZ6 is the desk's most-asked join,
and a positions map inside each balance row makes the forward read free and the reverse read a scan of
every portfolio in the store — the reach-through wearing a convenience's clothes, exactly as the part
preface warned. E3 reads the 2.2-shaped balance row, links each {asset, qty} as an edge,
deletes :positions from the row, and gates the result: positions struck out of the
balance row and copied down as edges -- the 2.2 label is paid. The balance keeps its cash; the
holdings became a relation; and the forward read returns exactly the promoted pairs, sorted. The
superseded representation shipped in Property Stores on ETS
(B2.2) — the label this rung pays.
The decision, generalized
content/bcs2.5.md · When · DecisionsInterim labels are debts, and this part pays them on stage: a representation shipped as interim names its chapter, and that chapter performs the migration in a rung, not a footnote. The migration runs in one callback's worth of writes — E3 is the template.
When to promote a pair to a relation: the moment either condition holds — the pair has facts of its own (a quantity, a weight, a since-date), or the reverse question exists anywhere in the product. Before both, a plain property field is fine and a relation is ceremony. Many-to-many is the native case; one-to-one may stay a field until the reverse question arrives, and the arrival is the migration trigger. Symmetric relations (pairs-with, offsets) are a design lane this rung does not build: model them as a normalized key order or as two directed stores, and say which in the system's doc.
Static verdicts — a pair with a quantity → promote: the facts go on the edge · no facts, but who holds X is asked → promote: the reverse question exists · one-to-one, no facts, no reverse question → stay a field: a relation is ceremony · the reverse question arrives → the arrival is the migration trigger — E3 the template, one callback's worth of writes.
References
sources · relatedSources
- Codd, E. F. — A Relational Model of Data for Large Shared Data Banksrelations as first-class; the normalization procedure gate E3 performs
- Erlang/OTP — the ets modulethe tables both representations lived in, before and after
Related
- B2.5 — Relations Are Systemsthe module hub; the full rung in context
- B2.2 — Property Stores on ETSthe chapter that shipped the interim label this rung pays
- B2 — The Elixir BCS Corethe chapter landing; the Part II arc
- Functional Programming in Elixirthe umbrella where echo_data lives