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 like Cassandra and HBase handle massive write throughput with sparse data. Learn column families, partition keys, and when to use them over SQL.
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 dramatically speed up queries. Learn B-tree, hash, composite, and covering indexes — with tradeoffs, slow query patterns, and interview examples.
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
WAL ensures database durability by writing changes to a log before modifying data. Learn how PostgreSQL, MySQL, and distributed DBs use WAL for crash recovery.
Vector databases store embeddings for semantic search and AI retrieval. Compare Pinecone, Weaviate, and pgvector with HNSW indexing and approximate nearest neighbor search.