The Logic Graph Epiphany | Max De Marzi
Max De Marzi
Graphs, Graphs, and nothing but the Graphs
Home<br>About
Contact
Services
Videos
Jun 22 2026
Leave a comment
By maxdemarzi
RelationalAI
The Logic Graph Epiphany
By the end of this blog post, you are going to experience two epiphanies about databases. However, you are going to have to do a little more work than just read. You are going to have to stop and actually think about what you’re reading. I promise it will be worth it. Let’s go!
A relational database has tables with columns of numbers we refer to as keys. User_ID 1, 2, 3, Place_ID 1, 2, 3, Book_ID 1, 2, 3… and so on. These are numbers that are hopefully the same on some other column on some other table. The database itself has absolutely no idea how things are connected until you query it and you tell it exactly how to use these columns to join the tables together. Think about that.
Now, a graph database has explicit relationships . You never have to ask it to search for some id in some column. It knows how things are connected. Tell me about yourself Node A. I am 5’11" and 200 lbs, I have brown eyes… Now tell me how you are related to the world. These are my Friends, these are the Companies I have worked at, these are the Skills I have learned, these are the Things I like. How are you and this other noted related? We are 4 hops away through x, y an z nodes.
That’s it. With that one idea, your database goes from disconnected tables to suddenly knowing about it’s structure, and relationships. The data was always there like some repressed memory, but now it can access it. You get tremendous power with that feature. But it stops there. How things are connected is ALL it knows. We can go much further. Before we do that, let’s talk about what’s going on in the world lately. Massive amounts of AI Tokens are being burned and vendors are talking about semantic layers to quench that fire.
Everyone is trying to add graphs to their AI pipeline. You have vendors selling "GraphRAG" and "knowledge graphs" and "context graphs" and "semantic layers" of all kinds. Some are in actual graph databases, some are in other kinds of databases, some are in markdown or yaml, some use popularity to decide what’s right and what’s wrong. You have projects like graphify that automatically builds a graph of your code and your documents into text to lower your token use. Then you have other projects like graphify md that builds compressed knowledge graphs of your code and your documents into text to lower your token use. Yeah, there are two of them with the same name and a hundred other variants all promising to lower your token use.
When you boil it down to the bare essentials. They all produce words . Words for your Large Language Model to read and try to interpret correctly. Words for your LLM to ingest and hallucinate.
Today is the last day, that you are using words. The song "Bedtime Story" by Madonna warns you about the dangers of relying on words. Take a good look at the lyrics and think about the last time you asked AI to do something and it got it oh so very wrong.
Today is the last day that I’m using words<br>They’ve gone out, lost their meaning, don’t function anymore<br>Words are useless, especially sentences<br>They don’t stand for anything<br>I’m traveling, traveling, leaving logic and reason<br>And all that you ever learned, try to forget…I’ll never explain again
The Material Girl, always avant-garde. LLMs appear intelligent because they’ve been trained on word sequences that usually make sense. We’ve encoded the things people know in language, so training LLMs on that language appears true on the surface. But it’s just words. So if adding more words isn’t going to solve things, what is?
It’s right there in the lyrics. Logic and Reason. Today most of the logic that governs how a database responds to complex business questions lives in queries, stored procedures, application code, and many other places that are not directly connected to the data. The only thing that comes close to the data is Views, which are very limited in most databases and graph databases don’t even have.
What if we made logic a first class citizen? What if we could write little fragments of logic that were directly tied to the data? Each composable and chainable, every fragment serving as a sort of "Lego Brick" that when placed together could be used to build large and complex systems? However, each one would be easy to understand and verify by a person. The logic could classify objects based on some aggregate. For example a user may become a "high value customer" when their total purchases over the last 90 days are over some threshold. The logic could derive properties. For example "number of days late" when a shipment is past the promised delivery date. Every day that passed the property would be automatically updated. Similar to a calculated fields but without the volatile data, cross table, and no chaining limitations imposed by most...