⚙️ Backend Engineering · Databases
Design schemas for change (MongoDB)
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
- 7Model around access patterns: embed what reads together
- 8Validate with JSON Schema at the driver level
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-mongodbInstall globally
$ npx skills add aniruddhaadak80/skills --skill databases-schema-design-basics-mongodb -gTags
#sql#schema#data-modeling#backend-engineering#databases