⚡AgentSkills
⚙️ 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

  1. 1Identify entities and relationships; write 10 queries you must answer well
  2. 2Normalize to 3NF by default; document any intentional denormalization
  3. 3Use UUIDs or bigint PKs; never emails or natural keys
  4. 4Add created_at/updated_at with DB-level defaults on every table
  5. 5Constrain with FKs, CHECKs, and NOT NULL — let the DB defend integrity
  6. 6Review growth estimates: which table hits 100M rows first, plan partitioning now
  7. 7Model around access patterns: embed what reads together
  8. 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-mongodb
Install globally
$ npx skills add aniruddhaadak80/skills --skill databases-schema-design-basics-mongodb -g

Tags

#sql#schema#data-modeling#backend-engineering#databases

Related skills

Normalize enough to stay consistent, denormalize deliberately where reads demand it.

⚙️ Backend Engineering·~35m

Normalize enough to stay consistent, denormalize deliberately where reads demand it.

⚙️ Backend Engineering·~35m

Find top offenders from real traffic, read plans, add targeted indexes, verify improvements.

⚙️ Backend Engineering·~35m