{"_self":{"principle":"Self-explaining payload — no external context required. This _self block describes what you are reading and where to look next.","widget":"article_bundle","feature":"bundle","name":"LLM article bundle","what":"Paste-ready package: body + claims + sources + voxels + provenance + manifest + constitution.","contains":"body, claims, sources, voxels, provenance, question graph, constitution, llm_manifest","slug":"oip-what-is-a-database","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-a-database/bundle?format=markdown"},"how_to_use":"Paste into any LLM. Read §SELF first. Write back via ingest or claim endpoints in llm_manifest.","write":null,"imessage":null,"router_tag":null,"proof_chain":[{"step":1,"claim":"Articles are voxel graphs of tiered claims, not prose blobs.","verify":"https://miscsubjects.com/api/articles/constitution"},{"step":2,"claim":"Claims link to hash-chained sources via source_ids.","verify":"https://miscsubjects.com/api/articles/oip-what-is-a-database/sources"},{"step":3,"claim":"Ask reads topology; ingest/claim append to ledger.","verify":"https://miscsubjects.com/api/protocol"},{"step":4,"claim":"Models queue growth: populate → collaborate → repair → reflex.","verify":"https://miscsubjects.com/api/protocol/grow"},{"step":5,"claim":"Graph proves its own shape (reflex) and $/claim (yield).","verify":"https://miscsubjects.com/graph.html?layer=reflex"},{"step":6,"claim":"Full feature index + _explain on every API response.","verify":"https://miscsubjects.com/api/articles/system-map"}],"related_features":[{"id":"topology","name":"Article topology","what":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-a-database/topology"}},{"id":"voxels","name":"Voxel graph","what":"Claims as atoms, sources as edges (supported_by, posted_by). Per-claim provenance.","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-a-database/voxels","write":"https://miscsubjects.com/api/protocol/claim"}},{"id":"ask","name":"Ask protocol","what":"Answer only from topology; creates question_node with gaps and ingest_hint.","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-a-database/prompts","write":"https://miscsubjects.com/api/protocol/ask"}},{"id":"ingest","name":"Ingest protocol","what":"Parse pasted evidence → source ledger + claims + evidence_ingest node.","urls":{"write":"https://miscsubjects.com/api/protocol/ingest"}},{"id":"claim_post","name":"Claim post protocol","what":"Prompt-injection style POST — one claim voxel with who_claims + posted_by.","urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-a-database/voxels","write":"https://miscsubjects.com/api/protocol/claim"}},{"id":"llm_manifest","name":"LLM manifest","what":"Machine-readable read/write contract for external LLMs.","urls":{"read":"https://miscsubjects.com/api/articles/llm-manifest"}}],"system_map":"https://miscsubjects.com/api/articles/system-map","system_map_markdown":"https://miscsubjects.com/api/articles/system-map?format=markdown","not_medical_advice":true},"_explain":{"feature":"bundle","name":"LLM article bundle","what":"Paste-ready package: body + claims + sources + voxels + provenance + manifest + constitution.","why":"Every feature is auditable collective intelligence","how":"Paste into any LLM. Read §SELF first. Write back via ingest or claim endpoints in llm_manifest.","model":null,"verifies":null,"urls":{"read":"https://miscsubjects.com/api/articles/oip-what-is-a-database/bundle?format=markdown"},"imessage":null,"router":null,"related":[{"id":"topology","what":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER."},{"id":"voxels","what":"Claims as atoms, sources as edges (supported_by, posted_by). Per-claim provenance."},{"id":"ask","what":"Answer only from topology; creates question_node with gaps and ingest_hint."},{"id":"ingest","what":"Parse pasted evidence → source ledger + claims + evidence_ingest node."},{"id":"claim_post","what":"Prompt-injection style POST — one claim voxel with who_claims + posted_by."},{"id":"llm_manifest","what":"Machine-readable read/write contract for external LLMs."}],"not_medical_advice":true},"bundle_version":1,"generated_at":"2026-07-04T22:42:16.404Z","slug":"oip-what-is-a-database","title":"What Is a Database?","url":"https://miscsubjects.com/a/oip-what-is-a-database","register":"oip_protocol","tags":["oip","protocol"],"posted_at":"2026-07-04T18:30:57.305Z","updated_at":"2026-07-04T19:01:11.272Z","body":"## What It Is\n\nA **database is a structured, durable store that accepts writes, returns reads, and answers queries with deterministic results.** It is a contract between a system and time: you put data in, you get the same data out, and the rules for how you ask are written in stone. Every database is a state machine that chooses a trade-off between speed, safety, and structural power.\n\n## Why It Matters\n\nWithout a database, every program lives in an amnesiac void. It starts, computes, stops, and forgets. A database is memory that outlasts the process. It turns ephemeral computation into persistent fact.\n\nBut the deeper importance is structural. A database is the boundary where a system decides what is true. It enforces shape, rejects contradictions, and resolves conflicts. It is the only place where multiple clients, multiple languages, and multiple moments in time agree on reality.\n\nIn the OIP view, a database is not a product. It is a protocol. It says: here is how we record, here is how we query, and here is how we prove what happened.\n\n## How It Works\n\nA database has four essential operations: create, read, update, delete (CRUD). Every interaction flows through these gates.\n\n**Step 1: A client connects.** The client opens a socket, a file handle, or an HTTP connection. The database authenticates or trusts. This is the session boundary.\n\n**Step 2: The client sends a command.** The command is a structured string, a JSON payload, or a binary packet. The database parses it. If the syntax is wrong, the database rejects the command immediately. No partial execution. No silent corruption.\n\n**Step 3: The database plans and executes.** For a write, it checks constraints, locks or sequences, writes to a log or buffer, and then applies the change to the primary data structure. For a read, it scans indexes, filters rows, and returns a result set. The plan is deterministic: the same query on the same data always returns the same result.\n\n**Step 4: The database commits.** A commit is a promise: the write is durable. It survives power loss. It is now part of the agreed-upon state. Until commit, the write is a draft, visible only to the transaction that issued it.\n\n**Step 5: The client receives a response.** Success, error, or a data packet. The client acts on it. The cycle repeats.\n\nThis is the loop. Everything else is optimization.\n\n## The Contract\n\nA database is defined by its contract, not its implementation. The contract specifies:\n\n- **Storage model:** key-value, document, relational, graph, columnar, or vector. This determines what questions you can ask efficiently.\n- **Durability guarantee:** write-ahead logging, replication, or eventual consistency. This determines what happens when power fails or the network partitions.\n- **Isolation level:** serializable, snapshot, read-committed, or eventually consistent. This determines whether concurrent transactions see each other's work in progress.\n- **Query language:** SQL, a proprietary API, or a path-based traversal. This determines how you ask.\n- **Schema enforcement:** rigid (pre-declared columns), flexible (dynamic fields), or schema-on-read (inferred at query time). This determines how you validate.\n\nA database that changes its contract without notice is a broken system. A database that hides its contract is a liability.\n\n## Real Examples\n\n**SQLite.** A single file, zero server, full SQL. It runs on phones, browsers, and embedded devices. It proves that a database does not need a network port to be a database. It writes a write-ahead log, commits to a B-tree, and locks at the page level. One file. One contract. Billions of deployments.\n\n**PostgreSQL.** The open-source relational benchmark. It enforces schemas, supports complex joins, and extends its own type system. It uses multiversion concurrency control (MVCC): every transaction sees a snapshot of the database at its start time. Readers do not block writers. Writers do not block readers. It is the reference implementation for how a general-purpose database should behave.\n\n**Redis.** An in-memory key-value store with optional persistence. It sacrifices the query richness of SQL for speed. It stores strings, lists, sets, hashes, and streams in RAM, with optional AOF (append-only file) or RDB snapshots for durability. It proves that a database can be a data structure server.\n\n**Bitcoin blockchain.** Append-only, distributed, proof-of-work. Every block is a write-once record. No updates. No deletes. The query language is transaction verification and UTXO scanning. It is a database optimized for distrust.\n\n**DuckDB.** An in-process analytical database. It reads Parquet, CSV, and JSON as native formats. It vectorizes query execution for columnar data. It proves that OLAP workloads do not need a cluster. A single file, local execution, analytical speed.\n\n## Common Mistakes\n\n**Treating a database as a dumb bucket.** A database is not a passive container. It is an active engine. Queries shape performance. Schema shapes correctness. Ignoring either is malpractice.\n\n**Using a database as a message queue.** Databases do transactions, not real-time event streaming. They lock. They serialize. They poll. A database is not a queue. A queue is a database with a different contract.\n\n**Assuming the default isolation level is safe.** Read-committed is the default in many engines. It allows non-repeatable reads and phantom rows. If your logic assumes serializable behavior, you will have race conditions. Know your isolation level. Name it in your code.\n\n**Ignoring the write-ahead log.** The WAL is the real database. The tables are a view. If you do not understand how your engine writes to the log before it writes to the page, you do not understand what happens when the power goes out.\n\n**Designing the schema late.** Schema-on-read is not a replacement for thinking. It is a deferral. Every query that reads a loosely-structured document pays the cost of inference and validation at runtime. That cost compounds.\n\n## Connection to OIP\n\nOIP is built on three principles: open, deterministic, auditable. A database is the physical realization of all three.\n\n**Open.** The schema is not a secret. The query language is not a secret. The storage format is not a secret. If a database hides its contract, it is not a tool. It is a dependency. OIP demands that every database layer expose its shape, its access patterns, and its durability semantics in a machine-readable contract.\n\n**Deterministic.** The same query on the same state must return the same result. No hidden configuration. No session-dependent behavior. A database that changes its output based on undocumented flags or implicit context is a non-deterministic function. OIP rejects non-determinism at the storage layer because it propagates to every layer above.\n\n**Auditable.** Every write must be traceable. Every read must be loggable. The database must support replay, diff, and inspection. If you cannot reconstruct the state of the database at time T from the log of events before T, you do not have an audit trail. You have a guess.\n\nIn OIP, the database is not an implementation detail. It is the anchor of truth. Everything above it is computation. Everything below it is physics. The database is where the system decides what is real.\n\n## Connection to the Grain Philosophy\n\nThis protocol is part of the [Open Inventory Protocol](/a/philosophy) — a living system of self-describing voxels that serves the Grain philosophy. The OIP is the interface. The philosophy is the core.\n","claims":[],"sources":[],"voxels":{"slug":"oip-what-is-a-database","counts":{"voxels":0,"sources":0,"edges":0},"note":"slim bundle — full voxels at /api/articles/oip-what-is-a-database/voxels"},"constitution":{"url":"https://miscsubjects.com/api/articles/constitution"},"provenance":[],"contributions":[],"topology":null,"slim":true,"ledger_totals":{"claims":0,"sources":0,"exported_claims":0,"exported_sources":0},"question_graph":{"slug":"oip-what-is-a-database","questions":[],"evidence":[],"edges":[],"counts":{"questions":0,"evidence":0,"edges":0}},"verification":{"provenance":{"valid":true,"entries":0,"head":"genesis"},"sources":{"valid":true,"entries":0,"head":"genesis"}},"counts":{"claims":0,"sources":0,"provenance":0,"contributions":0,"questions":0,"evidence_ingests":0,"voxel_edges":0},"llm_manifest":{"version":"1","site":"https://miscsubjects.com","purpose":"Peptide evidence articles with hash-chained source ledgers, tiered claims, and a question graph. LLMs should READ bundles/URLs and WRITE back via ingest — never invent doses.","read":{"human_page":"https://miscsubjects.com/a/oip-what-is-a-database","bundle_json":"https://miscsubjects.com/api/articles/oip-what-is-a-database/bundle","bundle_markdown":"https://miscsubjects.com/api/articles/oip-what-is-a-database/bundle?format=markdown","topology":"https://miscsubjects.com/api/articles/oip-what-is-a-database/topology","question_graph":"https://miscsubjects.com/api/articles/oip-what-is-a-database/question-graph","sources":"https://miscsubjects.com/api/articles/oip-what-is-a-database/sources","provenance":"https://miscsubjects.com/api/articles/oip-what-is-a-database/provenance","contributions":"https://miscsubjects.com/api/articles/oip-what-is-a-database/contributions","graph_topology":"https://miscsubjects.com/api/articles/oip-what-is-a-database/graph-topology?question={question}","voxels":"https://miscsubjects.com/api/articles/oip-what-is-a-database/voxels","constitution":"https://miscsubjects.com/api/articles/constitution","ontology":"https://miscsubjects.com/api/articles/ontology","system_map":"https://miscsubjects.com/api/articles/system-map","system_map_markdown":"https://miscsubjects.com/api/articles/system-map?format=markdown","health":"https://miscsubjects.com/api/articles/oip-what-is-a-database/health","repair":"POST https://miscsubjects.com/api/protocol/repair","list_articles":"https://miscsubjects.com/api/articles","graph_canvas":"https://miscsubjects.com/graph.html?slugs=oip-what-is-a-database","graph_yield":"https://miscsubjects.com/api/graph?slugs=oip-what-is-a-database&layer=yield","obsidian_vault":"https://miscsubjects.com/api/articles/obsidian-vault?slugs=oip-what-is-a-database","graph_query":"https://miscsubjects.com/api/v1/query?from=oip-what-is-a-database&kind=claim&where=tier=human"},"ask":{"description":"Answer only from topology; creates a question_node with gaps.","api":"POST https://miscsubjects.com/api/protocol/ask","body":{"slug":"{slug}","question":"string"},"imessage":"oip-what-is-a-database|your question","router_tag":"[ARTICLE_ASK]oip-what-is-a-database|question[/ARTICLE_ASK]","auth":"x-terminal-key header for API; iMessage/WhatsApp via miscsubjects build"},"ingest":{"description":"Parse pasted evidence → source ledger + claims + evidence_ingest node.","api":"POST https://miscsubjects.com/api/protocol/ingest","body":{"slug":"{slug}","evidence":"paste text","question_node_id":"optional qn_..."},"imessage":"ingest oip-what-is-a-database|q:{node_id}|paste evidence","router_tag":"[ARTICLE_INGEST]oip-what-is-a-database|evidence[/ARTICLE_INGEST]","tiers":["human","preclinical","anecdotal","mechanistic","speculative"]},"claim":{"description":"Prompt-injection style POST — one claim voxel with who_claims + posted_by provenance.","api":"POST https://miscsubjects.com/api/protocol/claim","body":{"slug":"{slug}","text":"one assertion","tier":"human|preclinical|anecdotal|mechanistic|speculative","who_claims":"study author, platform, or model id","source_ids":"optional [s1]"},"imessage":"claim oip-what-is-a-database|tier|assertion — who claims it?","router_tag":"[ARTICLE_CLAIM]oip-what-is-a-database|tier|assertion[/ARTICLE_CLAIM]","slots":["what_it_is","who_claims_what","what_is_known","what_is_unknown","mechanism","limitations","disclaimer"]},"tiers":{"human":0.8,"preclinical":0.5,"anecdotal":0.3,"mechanistic":0.3,"speculative":0.1},"invariants":["Self-explaining — every API JSON has _self; every paste widget has §SELF; root index at /api/articles/system-map","Append-only — revisions preserved at ?rev=n","Source chain verifies integrity, not truth","Answers must cite claim ids and source ids from topology","Not medical advice"],"constitution":{"version":1,"principle":"Articles are voxel graphs of claims — not prose blobs. Every assertion is a claim atom with tier, weight, source_ids, and posted_by provenance.","slots":[{"id":"what_it_is","required":true,"answers":"What is this peptide/stack/condition?"},{"id":"who_claims_what","required":true,"answers":"Who claims what — study authors, platforms, n=?"},{"id":"what_is_known","required":true,"answers":"What is known with tier labels (human/preclinical/anecdotal)"},{"id":"what_is_unknown","required":true,"answers":"What is NOT known — explicit gaps"},{"id":"mechanism","required":false,"answers":"Proposed mechanism (mechanistic tier only)"},{"id":"limitations","required":true,"answers":"Limits of evidence — no dose advice"},{"id":"disclaimer","required":true,"answers":"Not medical advice"}],"claim_rules":["One claim = one falsifiable assertion. No compound claims.","Every claim must declare tier: human|preclinical|anecdotal|mechanistic|speculative|system.","system tier = architecture/design axioms (not biological mechanism). Use for protocol self-definition.","Sourced claims must cite source_ids from the hash-chained ledger.","Unsourced claims must set source_status: unsourced and why_material.","posted_by is mandatory on every new claim (model id, human, or channel).","No medical advice, no doses, no 'you should take'.","Bad information is retracted (status:retracted), never deleted — retraction event stays on ledger.","Adversary challenges link via challenges[] / challenged_by[] — target may be downweighted.","Leaked secrets are scrubbed to [REDACTED:secret-leak] with scrub_events tombstone — honest audit trail."],"source_rules":["Every source is a voxel edge: type, url, exact quote, summary, found_by, accessed_at.","Sources hash-chain — prev/hash on append.","Anecdotal sources must name platform (reddit|x|youtube|imessage|user_entry)."],"ontology_rules":["Peptide articles (bpc-157, tb-500) are tree roots.","Condition articles (bpc-157-glp1-gut-damage) branch from peptides.","Stack articles (wolverine-stack-glp1) compose peptides — never duplicate peptide mechanism prose.","If an article has no parent embeds and is not a root peptide → sprawl candidate.","Misstep = duplicate scope with another slug; merge or reparent via embeds."],"post_protocol":{"claim":"POST /api/protocol/claim","source":"POST /api/protocol/sources","ingest":"POST /api/protocol/ingest","webhook":"POST /api/articles/<slug>/webhook {kind:claim|source}","imessage_claim":"claim {slug}|{tier}|your assertion — who claims it, source?","imessage_ingest":"ingest {slug}|evidence paste"}},"this_article":{"slug":"oip-what-is-a-database","url":"https://miscsubjects.com/a/oip-what-is-a-database","bundle_url":"https://miscsubjects.com/api/articles/oip-what-is-a-database/bundle?format=markdown"}},"api_urls":{"bundle":"https://miscsubjects.com/api/articles/oip-what-is-a-database/bundle","bundle_markdown":"https://miscsubjects.com/api/articles/oip-what-is-a-database/bundle?format=markdown","topology":"https://miscsubjects.com/api/articles/oip-what-is-a-database/topology","voxels":"https://miscsubjects.com/api/articles/oip-what-is-a-database/voxels","constitution":"https://miscsubjects.com/api/articles/constitution","ontology":"https://miscsubjects.com/api/articles/ontology","question_graph":"https://miscsubjects.com/api/articles/oip-what-is-a-database/question-graph","ask":"https://miscsubjects.com/api/protocol/ask","ingest":"https://miscsubjects.com/api/protocol/ingest","claim":"https://miscsubjects.com/api/protocol/claim","system_map":"https://miscsubjects.com/api/articles/system-map","system_map_markdown":"https://miscsubjects.com/api/articles/system-map?format=markdown"}}