feat(wiki): databases/selection — datastore choice by workload (relational/document/vector/graph) - #177
Merged
Merged
Conversation
…rkload Four researched pages on which database type to choose when designing an architecture: overall datastore-by-workload gate (polyglot persistence), JSONB vs document store, pgvector vs dedicated vector engine, and relational CTEs vs graph database. Domain/root indexes routed, two-way related links added, log entry appended. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K7rjymauWGk7kPdNc8iKSa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New wiki category
databases/selection— architecture-level guidance on which database type to choose for a workload, motivated by the PostgreSQL / JSONB·MongoDB / Vector DB / Graph DB role split. Researched via Brave Search; every page carries checkable sources.Pages (4 new):
choosing-a-datastore-by-workload— default to one relational system of record; three-question gate before adding any specialized store; workload→store mapping; derived-projection + one-way-sync rulerelational-jsonb-vs-document-store— split queried core into columns, variance into JSONB; JSONB vs MongoDB decision table incl. write-amplification and sharding casesvector-search-engine-selection— start with pgvector; measured move-indicators (RAM footprint of HNSW, rebuild stalls, OLTP contention, hybrid search); vector store as re-derivable indexgraph-workloads-relational-vs-graph-db— edge table + recursive CTEs first; traversal-shape decision table; ≥3-hop / pattern-matching / graph-algorithm adoption criteria; CTE cycle/depth pitfallsPlumbing:
wiki/databases/index.mdgets theselectionsection + routing line, rootINDEX.mddatabases row extended, two-wayrelated:links to 4 existing pages,log.mdingest entry.INGEST_REPORT
Verified best-practice
Each directive is backed by sources returned from live Brave searches (2026-09-03): martinfowler.com PolyglotPersistence, postgresql.org JSON-type docs, pgvector GitHub README, Neo4j graph-vs-relational, plus current benchmark/comparison articles (tensoria.fr 100M-vector benchmark, nisai.dev 2026 comparison, qdrant.tech pgvector-tradeoffs — cited even though it argues the vendor's side, for the sync-pain evidence). No URL was invented; all are cited in each page's
Sourcessection with what they support. Checks pass locally:wiki-lint-prohibitions.js→ 0 violations, 75 directive units (unchanged, no test bump needed);wiki-structure-checks.js→ 275 pages, 0 findings;tests/wiki-lint-prohibitions.bats,tests/pre-flush-pr-gate.bats,tests/review-routing.batsall green.Existing-layer check
Pages read: databases index (all category tables), databases-schema-design-column-data-types, databases-schema-design-requirements-to-tables, databases-schema-design-foreign-keys-and-referential-actions, databases-indexing-partial-and-expression-indexes, databases-transactions-isolation-level-selection (format reference). The existing databases categories (indexing, query-optimization, schema-design, operations, data-survey, sqlite, transactions) all assume the relational DB is already chosen — none covers which store type to pick. Overlap handled by deference: column-type mechanics defer to
column-data-types(noted in the index load-when line), JSONB indexing defers topartial-and-expression-indexes, both linked two-way instead of duplicated.Open-PR check
gh pr list --state open→ empty. No open knowledge/* or wiki PR overlaps; no sibling-duplicate risk.Routing decision
Domain
databases(root INDEX routing line extended accordingly). No existing category covers store-type selection under another name, so a newselectioncategory was created per wiki-ingest step 3, with four single-trigger pages rather than one oversized page (each has a distinct "load when" situation; the overview page cross-links the three specialized ones).🤖 Generated with Claude Code
https://claude.ai/code/session_01K7rjymauWGk7kPdNc8iKSa