liveBook · Manning

Polyglot persistence

As explained in Grokking Software Architecture

An architectural strategy that uses different data-storage technologies for different data needs.

Polyglot persistence matches different data workloads to different storage technologies instead of searching for one perfect database. A streaming service might use SQL for billing, NoSQL for watch progress, and a vector database for recommendations. section 8.10 section 8.2.6

The choice follows the business constraint: billing needs accurate transactions, watch progress prioritizes write speed at scale, and recommendations need semantic similarity. Each choice accepts a tradeoff; for example, watch progress can tolerate a small amount of lost data. section 8.2.6

Table 8.3 The Clarity Engineer’s Database Decision Matrix
The Question
SQL (The Accountant)
NoSQL (The Collector)
Vector (The Brain)
Data Type?
Structured with strict relationships.
Variable or unpredictable JSON documents
High-dimensional mathematical embeddings
Consistency?
Absolute (ACID guarantees).
Flexible (BASE / Eventual).
Probabilistic (Approximate matches).
Scaling Priority?
Integrity and complex joins.
Raw write speed and horizontal scale.
Semantic similarity and intent.
Search Logic?
Exact keyword matching.
Key-value or field-based filtering.
Semantic "neighborhood" distance.
Maintenance?
High (Often needs a DBA for complex tuning).
Low to Medium (Managed PaaS options).
Medium (Usually requires an AI service for embeddings).
Operational Overhead & Skill Required?
Low to Medium: Tooling is well understood, standard SQL skills, and predictable migrations.
Medium: Requires tracking schema drift in code and managing distributed clusters.
High: Requires specialized expertise in vector indexing algorithms, RAM management, and AI pipeline sync.
Cost?
Predictable. You pay for the server size (CPU/RAM).
Scalable. Usually "pay-per-request" or storage volume.
Premium. High RAM usage + cost of AI embedding API calls.
Tradeoff?
You trade speed for Bulletproof Accuracy.
You trade strict structure for Unlimited Growth.
You trade literal truth (and cash!) for Human Meaning.

Compare SQL, NoSQL, and vector databases by data type, consistency, scaling priority, search, and maintenance needs. section 8.2.6

Specialized stores bring an operational tax: teams must learn different query languages and failure modes, coordinate deployments and migrations, and manage separate costs, monitoring, and backups. Before adding another engine, weigh its functional or performance gain against that overhead; if the benefit is not clear, keep the workload in the primary database. section 8.2.7

How Grokking Software Architecture covers it

How deep it goes
Explains workload tradeoffs with a decision matrix and streaming example, then details expertise, deployment, cost, and backup overhead.
Examples
Uses a streaming platform’s billing, watch-progress, and recommendation features to illustrate database choices and accepted tradeoffs.
What it assumes
Assumes the ability to identify business constraints such as transaction accuracy, write speed, and semantic search needs.
What you can do after
Evaluate database choices by matching workload constraints against performance gains and operational costs.
How it connects
Connects SQL, NoSQL, vector databases, ACID transactions, horizontal scaling, and semantic search to workload-specific storage choices.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.