⚙️ Backend Engineering · Databases
Design schemas for change (MySQL)
Normalize enough to stay consistent, denormalize deliberately where reads demand it.
foundation~35 minBackend EngineersAPI DevelopersPlatform Engineers
Steps
- 1Identify entities and relationships; write 10 queries you must answer well
- 2Normalize to 3NF by default; document any intentional denormalization
- 3Use UUIDs or bigint PKs; never emails or natural keys
- 4Add created_at/updated_at with DB-level defaults on every table
- 5Constrain with FKs, CHECKs, and NOT NULL — let the DB defend integrity
- 6Review growth estimates: which table hits 100M rows first, plan partitioning now
- 7Pick InnoDB with utf8mb4; watch index length limits
- 8Beware implicit type coercion in joins
Common Pitfalls
- ▲Soft-delete columns complicating every unique constraint
- ▲Storing money as float instead of integer minor units
Commands
Install with skills CLI
$ npx skills add aniruddhaadak80/skills --skill databases-schema-design-basics-mysqlInstall globally
$ npx skills add aniruddhaadak80/skills --skill databases-schema-design-basics-mysql -gTags
#sql#schema#data-modeling#backend-engineering#databases