databases
Practical resources about databases for software engineers.
89 results
Storing, Querying, and Scaling Data
Databases are the persistence layer every application depends on. Choosing between relational and NoSQL, designing indexes, handling migrations, and optimizing slow queries are skills that directly impact user experience and infrastructure cost.
This section covers recipes for PostgreSQL and MySQL connections, MongoDB CRUD operations, Redis caching strategies, and schema design patterns. You will also find guides on ACID transactions, connection pooling, and full-text search implementation.
Design a DynamoDB Single-Table Schema for Serverless Apps
Design a DynamoDB single-table schema with composite keys, GSI patterns, and access patterns for...
Multi-Tenant Data Isolation Pattern
Isolate tenant data in shared infrastructure using row-level security, schema-per-tenant, or...
Composite Entity Pattern
Map a coarse-grained entity to multiple database tables by composing dependent objects, so the...
Data Mapper Pattern: Keep Domain Models DB-Free
Separate in-memory domain objects from the database by delegating persistence to a dedicated mapper...
Database per Service Pattern
Give each microservice its own private database to ensure loose coupling, independent deployment,...
Eager Loading Pattern: Fix the N+1 Problem
Load related data in a single query rather than multiple round-trips, preventing the N+1 problem...
Geode Pattern: Partition Data Across Independent Nodes
Partition data so each node owns a non-overlapping shard with its own storage. Horizontal scaling...
Identity Map Pattern
Cache objects by primary key so each database row maps to a single in-memory instance per...
Materialized View Pattern
Precompute and store expensive query results in a read-optimized cache to avoid repeated costly...
Repository Pattern with TypeScript Generics
Implement a type-safe repository pattern in TypeScript that decouples data access logic from domain...
Serverless DB Connection Pooling Pattern
Manage database connections across serverless invocations by using external connection poolers,...
Sharding Pattern
Split a large dataset into smaller partitions (shards) distributed across multiple servers to...
Specification Pattern
Encapsulate business rules for selecting objects as reusable, composable predicate objects that can...
Unit of Work Pattern
Track changes to in-memory objects during a business transaction and commit all updates atomically...
Data Migration Runbook Template with Rollback Steps
Use this data migration runbook template to plan safe migrations. Includes pre-migration checks,...
Database Failover Runbook
A step-by-step runbook for executing database failover procedures safely with minimal downtime and...
Database Query Tuning Checklist
A working checklist for tuning slow SQL queries: read the EXPLAIN plan, fix indexes, kill N+1...
Database Schema Documentation Template
A template for documenting database schemas with entity relationships, field definitions, and...
Complete Guide to RAG in Production
Take RAG to production: chunking strategies, vector store selection, hybrid retrieval, reranking,...
Data Lake vs Data Warehouse — Architecture Guide
How data lakes store raw data at scale: medallion zones, lakehouse tables, ETL vs ELT,...
No results found.