databases

Practical resources about databases for software engineers.

98 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.

advanced

Implement Event Sourcing in a Relational Database

Build event sourcing systems using relational databases with event stores, projections, and...

beginner

Execute Raw SQL

How to execute raw SQL queries safely with parameterized statements.

intermediate

Full-Text Search

How to implement full-text search with Elasticsearch, Meilisearch, and PostgreSQL.

beginner

CRUD Operations with MongoDB and Mongoose

How to perform Create, Read, Update, and Delete operations in MongoDB using Mongoose ODM with...

intermediate

Optimistic Locking in Databases

Implement optimistic locking with versioning to prevent lost updates. Practical examples in...

intermediate

PostgreSQL Query Optimization and Indexing Strategies

Analyze and optimize slow PostgreSQL queries using EXPLAIN, proper indexing, partial indexes, and...

intermediate

Redis Cache Patterns for High-Performance Applications

How to implement cache-aside, write-through, and write-behind patterns with Redis to reduce...

advanced

Database Schema Evolution

Evolve database schemas safely with backward-compatible changes, versioned migrations, and online...

beginner

Seed Database

How to seed databases with realistic data for development, testing, and staging environments using...

beginner

Soft Deletes: Database Pattern

Learn to implement soft deletes in databases. Practical examples in Python, JavaScript, and Java...

beginner

Find and Remove Duplicate Rows in SQL

Detect duplicate records in SQL tables using GROUP BY and HAVING, then remove them safely while...

intermediate

Set Up Full-Text Search Indexes

Configure full-text search indexes in PostgreSQL to query large text columns with ranking,...

intermediate

Analyze and Optimize SQL Indexes with EXPLAIN

Identify missing, unused, and inefficient indexes by reading execution plans and measuring query...

beginner

SQL Joins

Practical examples of INNER, LEFT, RIGHT, and FULL OUTER JOINs with real-world query patterns.

advanced

Zero-Downtime Column Rename Migration

Rename columns or change data types without locking tables by using views, triggers, and backfill...

advanced

Partition Large Tables by Date or Range

Split huge SQL tables into smaller partitions by date, range, or list to improve query performance...

intermediate

Traverse Hierarchical Data with Recursive CTEs

Query tree-like or graph-like structures in SQL using recursive common table expressions to walk...

intermediate

Rank Rows and Calculate Running Totals with Window Functions

Use SQL window functions to rank rows, compute running totals, and compare values within partitions...

intermediate

Use ORM for CRUD

How to perform CRUD operations using ORMs in Python, JavaScript, and Java.

advanced

Implement Event Sourcing with CQRS in Python

Build an event-sourced system with CQRS separation using Python, event store persistence,...

No results found.