Skip to main content

Storage Models

Understanding the landscape of modern databases and persistence technologies

The Storage Model Landscape

Storage models define how data is organized, stored, and retrieved. Each model makes different trade-offs between consistency, availability, partition tolerance, query flexibility, and performance.

Storage Models Overview

  • Relational (RDBMS) - SQL databases with ACID guarantees, normalized schemas, foreign keys. PostgreSQL, MySQL, Oracle
  • Key-Value Stores - Ultra-fast lookups by key, simple get/put/delete. Redis, Memcached, DynamoDB
  • Document Stores - Flexible JSON/BSON documents, nested data structures. MongoDB, CouchDB, Firebase
  • Wide-Column Stores - Massive scale column-oriented storage, sparse tables. HBase, Cassandra, BigTable
  • Graph Databases - Optimized for relationships and traversals. Neo4j, ArangoDB, Neptune
  • Time-Series Databases - Optimized for timestamped metrics and events. InfluxDB, Prometheus, TimescaleDB
  • Search Engines - Full-text search, relevance ranking, analytics. Elasticsearch, Solr, Meilisearch
  • In-Memory Systems - Sub-millisecond access, distributed caches, data grids. Redis, Memcached, Hazelcast
  • Object Storage - Unstructured data, blobs, files at petabyte scale. S3, GCS, Azure Blob Storage

Choosing Your Storage Model

The right choice depends on your access patterns:

Relational (RDBMS)
  1. Structured data with clear schema
  2. Complex queries with JOINs
  3. Strong consistency requirements
  4. ACID transactions needed
  5. Financial, healthcare, business data
Key-Value Store
  1. Simple get/set access pattern
  2. Sub-millisecond latency required
  3. Session storage, caching
  4. Distributed high-throughput needs
  5. Real-time gaming, ads, recommendations
Document Store
  1. Flexible, evolving schemas
  2. Nested/hierarchical data
  3. Horizontal scaling important
  4. JSON/document-oriented
  5. User profiles, content management
Graph Database
  1. Highly connected relationships
  2. Path finding, recommendation
  3. Complex queries on relationships
  4. Social networks, knowledge graphs
  5. Fraud detection, access control

CAP Theorem Trade-Offs

All distributed systems must choose two of Consistency, Availability, Partition Tolerance:

SystemPreferenceBest For
RDBMSCA (Consistency + Availability)Transactional systems, single datacenter
DynamoDBAP (Availability + Partition)Distributed, eventual consistency acceptable
CassandraAP (Availability + Partition)High-scale, distributed, fault-tolerant
ElasticsearchCA (Consistency + Availability)Search, analytics, single cluster

Polyglot Persistence Pattern

Modern applications use multiple storage models for different purposes:

┌─────────────┬──────────────┬─────────────────┐
│ Write │ Cache │ Read │
│ (RDBMS) │ (Redis) │ (Elasticsearch)│
└─────────────┴──────────────┴─────────────────┘
↓ Async Pipeline ↓
┌─────────────────────────────────────────────┐
│ Data Lake / Warehouse / Analytics │
│ (S3 + Athena/BigQuery) │
└─────────────────────────────────────────────┘

Performance Characteristics

ModelLatencyThroughputConsistencyComplexity
RDBMS1-10ms1K-10K ops/secStrongHigh
Key-Value<1ms100K-1M ops/secEventualLow
Document5-50ms10K-100K ops/secEventualMedium
Graph10-100ms1K-10K ops/secStrongHigh
Time-Series1-5ms100K-1M ops/secEventualMedium
Search10-100ms10K-100K ops/secEventualHigh

Next Steps

Explore each storage model in detail:

  1. Start with Relational (RDBMS) for foundational understanding
  2. Explore Key-Value Stores for caching and high-performance patterns
  3. Dive into Document Stores for flexible schema approaches
  4. Study Wide-Column Stores for massive-scale analytics
  5. Learn Graph Databases for relationship-heavy data
  6. Understand Time-Series Databases for metrics and monitoring
  7. Master Search Engines for full-text search and analytics
  8. Discover In-Memory Systems for low-latency requirements
  9. Implement Object Storage for unstructured data

Each model has detailed guides on use cases, trade-offs, implementation patterns, and operational considerations.