Grid · Section

Comparators

vs SQL, Datomic, Unix FS, honest where Grid loses

Comparators

Grid's closest neighbors.

Lifted from theory/comparators.grid, "any comparator that sounds like marketing gets rewritten." Same rule on this page.


Honest comparators against the three closest neighbors in the design space. Each entry answers: what they do, what we do, where the overlap is real, and where it ends, which side wins on each axis.

SQL (sqlite, embedded)

What they do
Relational algebra over typed rows in typed tables, with transactions, indexes, foreign keys, and a query language designed for joins. Durable, battle-tested, embedded in everything from browsers to airliners. The default answer for local structured storage on any platform.
What we do
Addressable cells in a single binary file with three verbs (study/write/move/watch), capability-by-invisibility projection, subscription axis, refs as first-class, bodies are free-form text with typed slots. No joins in the SQL sense, traversal happens via refs-of: and glob study:. No schema enforcement, cells are shaped by convention.
Where the overlap is real
Both are local, embedded, single-file, and durable. Both offer a query language with selection and projection. Both support history in some form (sqlite via rowid audit tables or WAL; Grid via history-of: on cells).
Where it ends, and which side wins
Joins across 10M rows at sub-second latency: SQL wins, not close. Schema enforcement and transactional rollback: SQL wins. Full-text search at scale: SQL with fts5 wins. Addressable agent memory with capability projection and a native subscription axis: Grid wins, SQL has triggers and notify but they are bolt-ons, not primitives. Self-documenting human-readable on-disk format: Grid wins for the 3am-with-less case; sqlite is a binary file.

Datomic / Datalog (also Crux/XTDB)

What they do
Fact-based storage, every assertion is an entity / attribute / value / time tuple. Queries are Datalog, a declarative logic language with joins expressed as conjunction of patterns. Time is first-class: you can query "the database as of yesterday at 3pm." Bidirectional refs fall out naturally. Durable, transactional, immutable log under the hood.
What we do
Cells with addresses instead of entity-attribute-value tuples. Each cell is closer to a document than a fact. History is per-cell via history-of:, not global as-of-time. Queries are three verbs plus as: projection, not Datalog. No logic variables, no conjunction-of-patterns. Refs are one-directional in the cell body; refs-of: walks them backwards on demand.
Where the overlap is real
Both treat refs as first-class. Both have strong history stories. Both are declarative in query shape. Both believe the data layer should be queryable in one language rather than via ORM gymnastics.
Where it ends, and which side wins
Recursive graph queries with logic variables: Datalog wins, clearly. Grid cannot express "find all cells N hops away from @/foo that reference a cell written by identity X" as a single expression, you would compose it in the harness. As-of-time queries across the whole database: Datomic wins. Capability projection with deny-by-invisibility: Grid wins, Datomic's model is read-or-not, not see-or-not. Human-readable single-file substrate: Grid wins. Agent residence as a first-class concern: Grid wins.

Unix filesystem + inotify

What they do
Hierarchical paths as addresses, files as content, mtime as history approximation, permissions as access control, inotify as the subscription primitive. Battle-tested since 1970. Every tool in the unix ecosystem already speaks it. Text-first by culture.
What we do
One file containing many cells, rather than one file per cell. Addresses are logical (@/foo/bar) rather than physical (/foo/bar). Capability projection via deny-by-invisibility rather than POSIX read/write/execute. Refs as first-class rather than as symlinks. A query language, not find+grep. Subscription as a language primitive, not a syscall.
Where the overlap is real
Hierarchical addressing, text-first storage, watch primitive, single-owner write discipline, cheap to back up with cp/rsync. Both are durable, both are inspectable without special tools, both scale to millions of entries on disk without fuss.
Where it ends, and which side wins
POSIX permissions leak via stat, you can see "permission denied" on a file you cannot read, which tells you the file exists and is a capability leak. Grid's deny-by-invisibility closes that. Grid wins on this axis cleanly. Query language: Grid wins, find+grep is a composition discipline, not a language. Refs as first-class: Grid wins, symlinks are a poor substitute because they don't survive rename and don't carry intent. Single-file portability: Grid wins, one grid file rsyncs atomically.

Missing a neighbor you'd expect? Vector databases, LangChain-style memory, Inngest / durable workflow runners, all interesting comparators, all on the parking lot. We add them when there's something honest to say beyond "different shape." See also: what Grid is not good at.

We use cookies to analyze site traffic and improve your experience. By accepting, you consent to the use of cookies for analytics and advertising purposes.