SQL vs NoSQL, RDBMS patterns, NoSQL database types.
Databases are the persistent storage layer in every system design, and choosing the right one fundamentally shapes your architecture's performance, scalability,
SQL databases prioritize consistency and structured relationships through ACID transactions and fixed schemas, while NoSQL databases optimize for scalability an
Sharding horizontally partitions data across multiple database instances, with each shard holding a subset of the total dataset. Unlike replication where every
Federation (functional partitioning) splits databases by business function or service boundary rather than by data volume. Instead of one monolithic database, y
Denormalization intentionally introduces redundancy into a normalized database schema to optimize read performance by eliminating expensive joins. This pattern
SQL tuning is the systematic process of diagnosing and optimizing slow queries by analyzing execution plans, eliminating anti-patterns, and applying targeted in
Key-value stores are the simplest NoSQL databases, optimizing for fast writes and lookups using a dictionary-like interface. Most production systems use LSM-tre
Document stores are NoSQL databases that store data as self-contained documents (typically JSON or BSON), allowing flexible schemas and nested data structures.
Wide column stores organize data into column families that can vary per row, storing sparse data efficiently with multi-dimensional mapping (row key, column key
Graph databases store data as nodes (entities) and edges (relationships), optimizing for multi-hop traversal queries that would require expensive joins in relat
Data lakes store raw, unstructured data in flat object storage for exploratory analytics and ML, while data warehouses store structured, schema-on-write data op
Database indexes are data structures that dramatically speed up query performance by creating shortcuts to data, trading write overhead and storage space for fa
Replication copies database data across multiple servers to improve read scalability, fault tolerance, and availability. Master-slave replication separates read
Search systems use inverted indexes—data structures that map terms to document IDs—to enable fast full-text search across millions of documents. Instead of scan
Vector databases store and query high-dimensional embeddings (dense numerical arrays representing semantic meaning) using specialized indexing algorithms like H
Write-Ahead Log (WAL) is a fundamental database reliability mechanism that ensures durability by writing all changes to a sequential log file *before* modifying