The obvious data model breaks on reality
Ontology 1 of 2 in Ontology Aspects: ontology · categories (reflection on boundaries) · contingencies (anomalous)
A schema drawn from typical cases rejects real data and accumulates special cases; the corrected path decides where structure ends, tests that boundary, and revises categories instead of patching.
Meta-rational here follows David Chapman: insights come frominvestigating the relationship between a system of technical rationality and its context
(Meta-rationality: An introduction). The pages call that stepping outside the procedure to ask whether it fits the situation.
Signals you are in this situation
Section titled “Signals you are in this situation”- Validation keeps rejecting real records: names, addresses, dates, quantities.
- Every sprint adds another special case to the same table or type.
- A field is nullable for now and nobody can say what null means.
- Support tickets describe the same edge case in different words.
- A column called notes or extra holds structured data.
The situation
Section titled “The situation”Hillel Wayne opens a confectionery textbook at random and sketches a data model for its recipes: a recipe is a list of ingredients, and an ingredient is a food with a mass. The next page calls for twenty-five lemon skins, so a measure has to be a mass or a count. The page after that lists foil cups, which are not food. Then an ingredient is optional, then one is a choice between two foods, then a recipe contains a sub-recipe with its own list. Each page breaks the model, and the model that survives is more complex and more fragile than the one he started with.
People break models the same way. John Graham-Cumming’s surname contains a hyphen. A web form rejected it as containing invalid characters, and every airline he has flown with records him as GRAHAMCUMMING. The lists of falsehoods programmers believe collect such cases for names, addresses, email, time, and much else. Each entry is an obvious assumption that reality violates.
The meta-rational perspective
Section titled “The meta-rational perspective”William Kent’s book on data modeling starts from the observation that data structures are maps and no map is the territory. An information system models a small part of the world on the expectation that one construct inside it corresponds to one thing outside it. Even that expectation fails at once. Is a part one kind of thing, as in an inventory file, or one physical object, as in a quality-control file? Each application resolves the ambiguity from context without noticing, and the resolution is lost when the two files are integrated. Kent’s conjecture is that information is too amorphous and too subjective for any formal model to capture completely, and that models are indispensable anyway.
Chapman’s account of ontological remodeling supplies the constructive side. Formal rationality works inside a fixed ontology, usually an implicit one, and that works while the ontology is good enough for the job. When it is not, rationality cannot repair it, because it cannot see its own categories. Meta-rationality treats the categories as changeable. A category can be dropped, demoted to an informal heuristic, or given a new formal meaning, and the choice depends on where the boundaries fall. Wayne’s practical proposal is the wastebasket, a deliberately unstructured place such as a free-text field for the cases that will not fit, with the structured model reserved for the cases that matter. The data cannot say which cases those are. That depends on what the software is for and who pays for each mismatch.
Every schema is wrong somewhere. The failure is a process that patches each anomaly in place, so that the model accumulates special cases without anyone deciding where its boundary should be.
What stays rational
Section titled “What stays rational”Where the domain already has a settled formal ontology, a strict schema is right and cheap. Amounts in a single currency, ISO country codes, an order status set that your own process defines, a foreign key to a table you control: type these, constrain them, and validate them hard, using the type system and the database. There is no wastebasket to design because no case fails to fit. These categories were defined by a formal system rather than abstracted from the world, so reality cannot surprise them. The corrected path is for counting-as categories: names, addresses, times, ingredients, anything people decided informally before software arrived.
Failure path
Section titled “Failure path”How to read this chart
- A red outline marks a break point, where the process stops looking at the situation.
- A dashed, faded card is a step the process skips.
- A teal pill names a skill inserted at that step; click it for the description.
- A red dashed loop shows the same process restarting; a teal dashed loop shows a misfit noticed and sent back to an earlier step.
- A lettered badge marks where each loop starts.
The schema is drawn from the typical cases, fixed, and enforced with strict validation, and everything downstream is built on it. When real data arrives with foil cups, counts instead of masses, and hyphenated names, validation rejects it, and each rejection becomes a special case. The special cases accumulate into the fragile model Wayne warned about, and the users whose data was rejected have meanwhile been told that their names are invalid.
Corrected path
Section titled “Corrected path”Edge cases are hunted before the schema is fixed. The boundary between structured and unstructured is a recorded decision, and tests encode the falsehoods that were considered. Established libraries are preferred for the domains where the falsehood lists are longest. A test that cannot pass goes back to the boundary decision. A real anomaly goes back to the categories rather than into the patch queue. Wayne proposes the wastebasket and Chapman the remodeling; the choice of Pocock’s skills for each step is this guide’s.
Skills for this situation
Section titled “Skills for this situation”Central
Section titled “Central”| Skill | When to invoke it here | What it changes | Example |
|---|---|---|---|
domain-modeling |
While the model is still a sketch. | Invents edge-case scenarios, challenges each category, and records in GLOSSARY.md what an ingredient, a measure, or a name is for this system. |
/domain-modeling what counts as an ingredient here: foil cups, optional items, either-or choices, sub-recipes? |
grill-with-docs |
When deciding what the model will refuse to represent. Typed command. | Interrogates the boundary until it is a decision, and writes it as an ADR. | /grill-with-docs where the recipe model stops and free text begins |
tdd |
Once the boundary is decided. | Turns each considered falsehood into a test, so tests enforce the boundary instead of validation rules that reject people. | /tdd a name field that accepts hyphens, apostrophes, single names, and four-part names |
Supporting
Section titled “Supporting”| Skill | When to invoke it here | What it changes | Example |
|---|---|---|---|
research |
Before drawing the schema, and again before writing a parser. | A background agent reads the falsehood lists and records which established library already handles the domain. | /research which falsehoods about postal addresses apply to us, and which library handles them |
implement |
For the build. Typed command. | Builds the model with its escape hatch in place, so an unforeseen case degrades to unstructured data rather than to a rejection. | /implement the recipe model from the ADR, with the free-text fallback |
domain-modeling, again |
Whenever a new anomaly arrives in production. | Treats the anomaly as evidence about the categories, which may need splitting, demoting, or sending to the wastebasket. | /domain-modeling a recipe arrived that lists an ingredient by volume; revisit the measure category |
Common misreading
Section titled “Common misreading”One misreading turns the wastebasket into a philosophy. Since reality is nebulous, everything becomes free text, and the system can no longer answer a basic question because nothing is structured enough to query. The symptom is a reporting request that can only be met with a regular expression over a notes column.
The opposite misreading models every entry on a falsehood list, so the name table gains forty nullable columns for cases the product will never meet. Both skip the decision: where the boundary between structured and unstructured belongs for this software and these users, written down.
The strongest objection
Section titled “The strongest objection”Strict schemas catch errors at the point of entry, where they are cheapest to fix, and a free-text wastebasket loses data quality. Nothing in it can be validated, joined, or reported on, and it absorbs the cases that most needed attention. On this view the falsehood lists argue for modeling more carefully and testing more, not for giving up on structure.
The reply is that the wastebasket is a recorded boundary, not a dumping ground. What goes in it is decided deliberately, with the cost of each mismatch in view, and revisited when an anomaly turns out to matter. Strictness stays where it pays. What fails is the unmanaged alternative: a model that accumulates special cases without anyone deciding where it should stop.
Sources
Section titled “Sources”Where this comes from: the constructive argument is Chapman’s interlude on ontological remodeling, with the readings list’s ontology section pointing at Wayne and Kent. The examples are Wayne’s recipe model, Graham-Cumming’s surname, and Kent’s preface and first chapter.
- Hillel Wayne, Edge Case Poisoning.
- John Graham-Cumming, Your last name contains invalid characters.
- Kevin Deldycke and contributors, Awesome Falsehood.
- William Kent, Data and Reality, second edition, preface and chapter 1 (PDF); Hillel Wayne explains why the second edition.
- David Chapman, Interlude: Ontological remodeling.
- David Chapman, Meta-rational software development: Readings, section on ontology (part-paid post).