1
FoundationsThe Mental Model
What SapixDB is, why it exists, and how it differs from every database you have used before.
What you'll learn
- ✓Why SapixDB is not a relational DB, document store, or key-value store
- ✓The biology analogy: organism → agent → strand → record
- ✓The 5 core rules: immutable, tombstone-delete, parent_hash chain, Ed25519 signature, first-class time
- ✓Why this matters for AI agents, compliance, and audit trails
Challenge
Answer: (1) If you 'delete' a record in SapixDB, is it gone from disk? (2) What links two consecutive records? (3) Who signs a record when it is written?
Interactive Walkthrough
What you'll learn
What SapixDB is, why it exists, and how it differs from every database you've used before.
What SapixDB is NOT
- Not a relational database — no tables, no rows you UPDATE
- Not a document store — you do not patch documents in place
- Not a key-value store — you do not overwrite a key
- Not an event log you manage manually — the chain is structural
The biology analogy
SapixDB models data the way DNA works in biology:
| Biology | SapixDB |
|---|---|
| Organism | Organism (namespace) |
| Cell | Agent |
| DNA strand | Strand (hash-linked chain of records) |
| Nucleotide | Record (one immutable unit) |
| Genetic signature | Ed25519 signature on every record |
Core rules (never forget these)
- Records are immutable. Once written, a record never changes. Ever.
- Deletion is a tombstone. A "delete" writes a new tombstone record. Old data stays on disk.
- Every record knows its parent.
parent_hashlinks to the previous record — forming an unbreakable chain. - Every record is signed. The writing agent's Ed25519 keypair signs every record. Tampering is detectable.
- Time is a first-class citizen. Every record carries an HLC timestamp. You can query at any past moment.
Why this matters
- A medical record system can prove records were never altered — without a separate audit log
- An AI agent can own its data domain with cryptographic identity
- A financial system gets tamper-evident history by default — no extra work
- You never run
ALTER TABLEor write migration scripts
Challenge
Answer these without looking them up: 1. If you "delete" a record in SapixDB, is it gone from disk? 2. What links two consecutive records together? 3. Who signs a record when it is written?
---