StackKit

Database Tutorials

7 articles

Database · November 2, 2026 · 7 min read

Migrating from MongoDB to Postgres with Feature Flags

How CodeForge AI moved from MongoDB to Supabase Postgres one module at a time, using a backend flag, dual-backend repositories and an ID-remapping backfill.

Database · November 2, 2026 · 4 min read

SQL Window Functions Explained with Examples

Learn SQL window functions step by step: running totals, ROW_NUMBER vs RANK, LAG for comparisons, and top-N per group, with tested queries.

Database · September 18, 2026 · 4 min read

Database transactions and ACID properties explained

A practical guide to database transactions and ACID properties explained.

Database · May 22, 2026 · 4 min read

MongoDB aggregation pipeline practical guide

Learn MongoDB aggregation pipelines with worked examples using $match, $group, $addFields and $sort, plus common mistakes to avoid.

Database · May 22, 2026 · 4 min read

PostgreSQL indexing strategies for faster queries

A practical guide to PostgreSQL indexing strategies for faster queries.

Database · May 1, 2025 · 8 min read

SQL JOINs Explained: INNER, LEFT, RIGHT, and FULL with Real Examples

Master SQL JOINs once and for all. Learn the difference between INNER, LEFT, RIGHT, and FULL OUTER JOINs with clear diagrams and practical examples.

Database · April 5, 2025 · 7 min read

Database Indexing Explained Simply (With Real Query Examples)

Understand what database indexes are, how they work under the hood, when to add them, and common indexing mistakes that hurt performance.