PrepZone Logo
PrepZone

The Database Types Landscape

Thirteen engine families — relational, document, graph, vector, time-series — and where each fits.

Why this matters

  • Naming "Postgres or Mongo?" misses eleven other categories that solve real problems — search, caching, analytics, recommendations.
  • Architecture reviews expect you to place each engine in the stack with a clear access-pattern justification.
  • Over-using one database type creates expensive workarounds; under-using specialised stores leaves performance on the table.
  • The landscape evolves fast — vector databases for AI features joined the mainstream in 2024–2026.
SQL (Postgres)
ACID transactions
Complex joins
Fixed schema
NoSQL
Flexible schema
Horizontal scale
Specialised access
Structured relations with joins favour SQL. Flexible schema and horizontal scale favour NoSQL.

Relational (OLTP)

Examples: Postgres, MySQL, SQL Server.

VaultCommerce's system of record — customers, orders, payments, inventory. Fixed schema, JOIN queries, ACID transactions. The default choice when relationships and integrity dominate.

Java
SELECT c.email, COUNT(o.id) AS order_count
FROM customers c
LEFT JOIN orders o ON o.customer_id = c.id
GROUP BY c.email;

Document stores

Examples: MongoDB, Couchbase.

Flexible JSON documents for entities with varying attributes. VaultCommerce stores supplier catalog feeds where each vendor sends different spec fields. Not ideal for multi-document transactions without extra design.

Key-value and in-memory

Examples: Redis, Memcached, DynamoDB (key-value access model).

O(1) lookups by key. VaultCommerce uses Redis for shopping-cart hashes and rate-limit counters. DynamoDB serves keyed access at AWS scale with partition-key design.

Wide-column / column-family

Examples: Cassandra, HBase, ScyllaDB.

Optimised for high-write, append-heavy workloads spread across nodes. VaultCommerce's analytics pipeline writes clickstream events partitioned by session_id and time bucket — millions of inserts per minute without updating existing rows.

Graph databases

Examples: Neo4j, Amazon Neptune.

Nodes and edges for relationship-heavy traversals. "Customers who bought X also bought Y" across deep recommendation chains — three-hop neighbour queries that explode in SQL JOINs are natural in Cypher:

Java
MATCH (c:Customer)-[:PURCHASED]->(p:Product {sku: 'VLT-42'})
      -[:BOUGHT_WITH]->(rec:Product)
RETURN rec.name, count(*) AS strength
ORDER BY strength DESC LIMIT 10;

Search engines

Examples: Elasticsearch, OpenSearch.

Inverted indexes for full-text search, fuzzy matching, and aggregations. VaultCommerce's product search UI queries Elasticsearch; Postgres holds canonical product rows.

Time-series databases

Examples: TimescaleDB, InfluxDB, Prometheus.

Timestamp-indexed metrics and events. VaultCommerce tracks API latency and order-rate dashboards — append-only series with efficient range scans and downsampling.

Vector databases

Examples: pgvector (Postgres extension), Pinecone, Weaviate.

Store embedding vectors for similarity search. VaultCommerce's "shop by photo" feature compares uploaded image embeddings against a product vector index — nearest-neighbour queries impractical in plain B-tree indexes.

Data warehouses

Examples: Snowflake, BigQuery, Redshift.

Columnar analytics over historical data. Nightly ETL copies orders from Postgres into Snowflake for finance and merchandising reports — not for live checkout.

Quick placement guide for VaultCommerce

  • Checkout & payments → Relational OLTP (Postgres)
  • Sessions & hot caches → Key-value (Redis)
  • Product search → Search engine (Elasticsearch)
  • Clickstream ingest → Wide-column or time-series
  • Recommendations (deep graph) → Graph DB or precomputed tables
  • Semantic search → Vector index (pgvector or dedicated)
  • Board-level reporting → Warehouse (Snowflake)

Choosing without catalogue shock

AspectQuestion to askEngine family
Joins + transactions?YesRelational / NewSQL
Schema varies per record?HeavilyDocument
Full-text + facets?YesSearch
Millions of writes/sec per partition?YesWide-column / time-series
Similarity on embeddings?YesVector
  • Joins + transactions?

    Question to askYes
    Engine familyRelational / NewSQL
  • Schema varies per record?

    Question to askHeavily
    Engine familyDocument
  • Full-text + facets?

    Question to askYes
    Engine familySearch
  • Millions of writes/sec per partition?

    Question to askYes
    Engine familyWide-column / time-series
  • Similarity on embeddings?

    Question to askYes
    Engine familyVector

Quick recall

Everything you need if you only revisit this box.

  • Relational OLTP is VaultCommerce's system of record for orders and inventory.
  • Redis, Elasticsearch, Cassandra, Neo4j, Timescale, and vector stores each solve distinct access patterns.
  • Warehouses handle historical analytics; OLTP databases handle live transactions.
  • Add specialised engines when measured bottlenecks exceed relational tuning limits.
  • NewSQL bridges SQL semantics with horizontal scale for teams that outgrow single-node Postgres.

Test yourself

Answer these before moving on — recall is what makes it stick.