← All lessons/Foundations
1
Foundations

The 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:

BiologySapixDB
OrganismOrganism (namespace)
CellAgent
DNA strandStrand (hash-linked chain of records)
NucleotideRecord (one immutable unit)
Genetic signatureEd25519 signature on every record

Core rules (never forget these)

  1. Records are immutable. Once written, a record never changes. Ever.
  2. Deletion is a tombstone. A "delete" writes a new tombstone record. Old data stays on disk.
  3. Every record knows its parent. parent_hash links to the previous record — forming an unbreakable chain.
  4. Every record is signed. The writing agent's Ed25519 keypair signs every record. Tampering is detectable.
  5. 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 TABLE or 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?

---

Next →
Lesson 2: First Boot