backend-database
Installation
SKILL.md
Backend Database
Overview
PostgreSQL/Supabase database design, schema setup, RLS policies, performance optimization, and pricing guidance for Corey's projects.
Schema Design Principles
- Normalize first, denormalize for performance — Start with 3NF, add materialized views or denormalized columns only when query patterns demand it
- UUIDs for primary keys — Use
gen_random_uuid()as default - Timestamps on everything —
created_at,updated_atwith triggers - Soft deletes by default —
deleted_attimestamp, never hard delete in application layer - Audit trail — Track who changed what and when