Databases & persistence
- persistence
Design and Read B-Tree Indexes for Real Queries
Deep dive into B-Tree mechanics, composite index ordering, and selectivity for audit-log query optimization.
Read the article - database-design
Design DTOs and Mappings Around an API Contract
Learn to decouple internal database entities from external API contracts using Java Records and mapping strategies to control data visibility and editability.
Read the article - persistence
Primary Keys, Foreign Keys and Unique Constraints Protect Different Facts
Distinguishing row identity from business uniqueness and referential integrity in PostgreSQL and JPA.
Read the article - database-design
Map Entity Relationships Correctly with JPA
Deep dive into owning sides, mappedBy, and converting Many-to-Many relationships into join entities with attributes.
Read the article - persistence
Database Transactions and Spring Transaction Boundaries
Deep dive into ACID, Spring's @Transactional proxy mechanism, propagation, and the limits of rollback.
Read the article - schema-migrations
Evolve a Production Schema with Flyway Instead of Guesswork
Master versioned database migrations, the expand-contract pattern for zero-downtime updates, and recovery from failed DDL scripts.
Read the article - database-design
Normalize a Database Without Losing Business Meaning
Using functional dependencies to eliminate anomalies while preserving critical historical snapshots in repair invoices.
Read the article - database-design
From Business Rules to a Relational Database Model
A guide to transforming equipment rental business rules into a conceptual, logical, and physical database schema using Merise cardinalities.
Read the article - database-design
Model Users, Organizations and Tenant Memberships
A deep dive into B2B multi-tenancy modeling where users belong to multiple organizations with tenant-scoped uniqueness.
Read the article - persistence
Fetch Related Data Without Creating an N+1 Query Problem
A technical guide to optimizing data retrieval using fetch plans and entity graphs to avoid redundant database round-trips.
Read the article