Best of SQLApril 2026

  1. 1
    Article
    Avatar of hnHacker News·6w

    5NF and Database Design

    A deep dive into Fifth Normal Form (5NF) that argues traditional teaching approaches are unnecessarily confusing. The author critiques the Wikipedia example as poorly motivated and proposes starting from business requirements and a logical model instead. Two natural design patterns emerge: the AB-BC-AC triangle (three M:N junction tables connecting three entities) and the ABC+D star pattern (a central entity linked 1:N to three surrounding entities). Using ice cream preferences and concert musician examples, the post demonstrates that properly designed schemas are automatically normalized without needing to reason about 5NF decomposition explicitly. The post also covers composite vs. synthetic primary keys and how both patterns can coexist in the same schema.

  2. 2
    Article
    Avatar of hnHacker News·5w

    Drunk Post: Things I’ve Learned as a Senior Engineer

    A preserved Reddit post from a data engineer with 10+ years of experience, written candidly after a few drinks. Covers career advice (change companies to advance, be honest with managers), technical opinions (SQL is king, best code is no code, TDD is a cult), data engineering specifics (Airflow, streaming, ML project failure rates), and life reflections. Touches on work-life balance, remote work tradeoffs, tech stack philosophy, documentation as an underrated skill, and the importance of kindness. Raw, unfiltered, and widely relatable.

  3. 3
    Article
    Avatar of freecodecampfreeCodeCamp·6w

    How Database Indexes Work – A Practical Guide with PostgreSQL Examples

    A practical guide to database indexes in PostgreSQL covering how B-tree indexes work internally, how to create single-column, composite, partial, expression, and unique indexes, and how to use EXPLAIN ANALYZE to measure query performance. Also covers other index types (Hash, GIN, GiST, BRIN), index management (listing, sizing, finding unused, dropping, rebuilding), common mistakes that prevent index usage (function wrapping, type casting, leading wildcards, low selectivity), and best practices for indexing deliberately based on actual query patterns.