Build log

The Oak

Why a relational database gives you the trunk and nothing else, and what it takes to build something that can read across the wood itself.

Imagine a grand old oak tree, fallen on its side.

Every branch is still there. Every smaller branch growing from every larger one. Every leaf at the end of every twig. The structure is intact, the relationships are intact, the whole thing is exactly as it was when it was standing. It has just changed orientation.

Now try to read it.

Not the trunk. Not the primary branches. The relationships between a leaf on one branch and a leaf three branches away, through the wood itself, without going back down to the trunk and climbing up again. The knowledge that lives not in any single part of the tree but in the path between parts.

That is what I needed to hold. That is what a relational database cannot do.

What the Trunk Gives You

A relational database is very good at the trunk. It is also good at the primary branches, if you normalise carefully and think hard about your schema upfront. Foreign keys give you a way of saying this thing is connected to that thing, which looks, at first glance, like a relationship.

It is not a relationship. It is a pointer. And a pointer only goes one way, to one place, along one path that you defined when you built the schema. It tells you where the branch connects to the trunk. It tells you nothing about what the branch knows about the branch next to it.

The moment you need to traverse the tree laterally, across branches, reading the knowledge that exists in the connections rather than the nodes, the relational model has nothing for you. You write seventeen joins and convince yourself that is the same thing.

It is not the same thing.

What Kept Collapsing

I built several products before I built CongDB. A private equity intelligence platform. A content suite. A CRM. Each one hit the same wall at a different speed.

The wall was always the same: the data model could not hold what I was actually trying to represent. Not because the data was complex in isolation. Because the knowledge lived in the traversal, not the storage. The meaningful thing was never a single node. It was the path between nodes, and what that path implied about the relationship between the things at either end of it.

In a regulated environment, that matters enormously. A decision is not just the output of a single data point. It is the product of everything the system knows about how one thing relates to another, and how certain those relationships are, and how that certainty has changed over time. Flatten that into rows and columns and you have not stored the decision. You have stored a shadow of it.

Shadows are not auditable. Shadows do not hold up in a compliance review. Shadows cannot tell you, six months later, why the system believed what it believed at the point of decision.

Building Something That Could Hold the Tree

The answer was a graph. Not as a fashionable architectural choice. As the only structure that could actually represent what I was trying to model.

A graph holds the oak the way the oak actually is. Every node is a thing. Every edge is a relationship, a real one, with direction and weight and its own properties. The traversal is not a workaround or a query hack. It is the primary operation. Reading across branches is what the structure is built to do.

In Rust, that means building the traversal engine with the same discipline the compiler demands of everything else. Precise ownership of every node and every edge. No ambiguity about what is connected to what, or what the connection means. No silent failure when the path does not exist. The graph either knows the relationship or it does not, and if it does not, it says so explicitly rather than returning something that looks like an answer but is not.

That precision is the point. Not as a technical nicety. As the foundational requirement for infrastructure that has to be trusted.

What the Tree Knows

The oak fallen on its side still knows everything it knew when it was standing. The rings inside the trunk hold decades of context. The branches remember which direction the light came from. The relationships between every part of it are encoded in the structure itself, not in a separate table that points from one part to another.

That is the model. Not rows. Not columns. Not foreign keys pretending to be relationships.

The traversal of knowledge, read between branches and leaves on separate branches, through the wood itself.

That is what I needed to hold. That is what CongDB was built to do.