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.
CRUD Operations with MongoDB and Mongoose
How to perform Create, Read, Update, and Delete operations in MongoDB using Mongoose ODM with...
Optimistic Locking to Prevent Lost Database Updates
Implement optimistic locking with versioning to prevent lost updates. Examples in SQL, Node.js,...
PostgreSQL Query Optimization and Indexing Strategies
Analyze and optimize slow PostgreSQL queries using EXPLAIN, proper indexing, partial indexes, and...
Redis Cache Patterns for High-Performance Applications
How to implement cache-aside, write-through, and write-behind patterns with Redis to reduce...
Database Schema Evolution
Evolve database schemas safely with backward-compatible changes, versioned migrations, and online...
Seed Database
How to seed databases with realistic data for development, testing, and staging environments using...
Implement Soft Deletes in Databases with Python, JS and Java
Learn to implement soft deletes in databases. Practical examples in Python, JavaScript, and Java...
Find and Remove Duplicate Rows in SQL
Detect duplicate records in SQL tables using GROUP BY and HAVING, then remove them safely while...
Set Up Full-Text Search Indexes
Configure full-text search indexes in PostgreSQL to query large text columns with ranking,...
Analyze and Optimize SQL Indexes with EXPLAIN
Identify missing, unused, and inefficient indexes by reading execution plans and measuring query...
Zero-Downtime Column Rename Migration
Rename columns or change data types without locking tables by using views, triggers, and backfill...
Partition Large Tables by Date or Range
Split huge SQL tables into smaller partitions by date, range, or list to improve query performance...
Traverse Hierarchical Data with Recursive CTEs
Query tree-like or graph-like structures in SQL using recursive common table expressions to walk...
Rank Rows and Calculate Running Totals with Window Functions
Use SQL window functions to rank rows, compute running totals, and compare values within partitions...
ORM CRUD with SQLAlchemy, Prisma & Hibernate
How to run create, read, update, and delete operations with SQLAlchemy, Prisma, and Hibernate — the...
Implement Event Sourcing with CQRS in Python
Build an event-sourced system with CQRS in Python: event store, aggregate roots, projections,...
Implement the Transactional Outbox Pattern for Reliable
Use the transactional outbox pattern to reliably publish domain events alongside database changes,...
Optimize Queries with Database Indexing
How to create, analyze, and maintain indexes to speed up database queries and avoid common indexing...
Prevent SQL Injection with SQLAlchemy Parameterized Queries
Protect Python applications from SQL injection using SQLAlchemy parameterized queries, ORM models,...
Live Database Credentials with HashiCorp Vault
How to use HashiCorp Vault to generate short-lived database credentials, eliminating hardcoded...
No results found.