agentsclimarketplace

Database normalization

Skill Amey-Thakur/AI-SKILLS/skills/databases/database-normalization

Plug-and-play skills and prompts for every AI coding agent

Install
npx -y skills add Amey-Thakur/AI-SKILLS --skill database-normalization

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 20 days oldThe repository was created 20 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Apply normal forms pragmatically and denormalize deliberately, weighing update anomalies against read performance. Use when designing a relational schema or deciding whether to denormalize.

SKILL.md

3.7 KB, 796 tokens by cl100k_base, as published. Nobody here has run it

Database normalization

Normalization organizes relational data so each fact lives in exactly one place, eliminating the update anomalies that duplication causes. The pragmatic practice is normalizing to third normal form by default, then denormalizing specific spots for performance with eyes open to the cost.

Method

  1. Normalize to 3NF as the default. Each table represents one entity, each column depends on the whole key and nothing but the key: no repeating groups (1NF), no partial-key dependencies (2NF), no transitive dependencies (3NF). This is the sensible starting point for transactional data: one fact, one place, so updates touch one row (see schema-design). Most schemas should live here.
  2. Understand the anomalies normalization prevents. Update anomaly (a fact duplicated in many rows must be updated everywhere, or they disagree), insertion anomaly (cannot record a fact without an unrelated one), deletion anomaly (deleting a row loses a fact it incidentally held). These are correctness bugs, not just tidiness; denormalization reintroduces them, which is why it is a deliberate trade (see nosql-modeling's denormalization cost).
  3. Denormalize for measured read performance, not preemptively. When profiling shows that a join is a real bottleneck (see query-plan-reading), duplicating a column or precomputing an aggregate can speed reads: but only after the join is proven slow, not by assumption. Premature denormalization takes on the anomaly cost with no confirmed benefit (see premature-abstraction's instinct, schema edition).
  4. When you denormalize, own the consistency. Duplicated data must be kept in sync: application logic, triggers, or a rebuild process that updates every copy on change (see the update-anomaly you just reintroduced). Undocumented denormalization where copies silently diverge is a data- integrity bug factory; make the sync mechanism explicit and tested.
  5. Enforce integrity with constraints, normalized or not. Foreign keys, unique constraints, check constraints, and not-null: the database enforcing invariants beats application code hoping to (see defensive-programming's fail-closed instinct). A normalized schema without constraints still permits the corruption normalization was meant to prevent.
  6. Match the model to the workload (OLTP vs OLAP). Transactional systems (many small writes, integrity- critical) favor normalization; analytical systems (heavy reads, aggregations) favor denormalized star schemas (see warehouse-modeling): the same data is modeled differently for different jobs, often with the analytical copy derived from the normalized source (see etl-vs-elt). Do not force one model to serve both.

Boundaries

  • Higher normal forms (BCNF, 4NF, 5NF) address rare specific anomalies; 3NF plus judgment covers almost all practical cases, and chasing perfect normalization can produce impractically many tables. Normalize for correctness, stop at usable.
  • Normalization is a relational-model discipline; document and other NoSQL stores model from access patterns and denormalize by default (see nosql-modeling): the anomaly awareness transfers, the default inverts.
  • The normalize-then-denormalize sequence matters: start normalized (correct), denormalize specific hot spots with a sync mechanism (fast where measured). Starting denormalized "for performance" usually buys anomalies before any measured need.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.