db-normalization
1
总安装量
1
周安装量
#76661
全站排名
安装命令
npx skills add https://github.com/kentoshimizu/sw-agent-skills --skill db-normalization
Agent 安装分布
amp
1
cline
1
opencode
1
cursor
1
continue
1
kimi-cli
1
Skill 文档
DB Normalization
Overview
Use this skill to decide normalization depth intentionally, preserving integrity without ignoring workload realities.
Scope Boundaries
- Duplicate mutable data causes inconsistency bugs.
- Schema design needs explicit normalization versus denormalization trade-offs.
- Teams are preparing for domain growth and evolving query patterns.
Core Judgments
- Normal form target per entity group (3NF/BCNF and justified deviations).
- Redundancy acceptance criteria and ownership.
- Denormalization scope and refresh semantics.
- Constraint placement for anomaly prevention.
Practitioner Heuristics
- Normalize data that changes frequently or has strict consistency needs.
- Denormalize only for measured read-path benefit with explicit maintenance strategy.
- Prefer derived data pipelines over ad hoc duplicated writable columns.
- Document who repairs divergence when denormalized copies drift.
Workflow
- Identify update anomalies and redundancy hotspots.
- Model normalized alternatives and expected consistency behavior.
- Evaluate read/write trade-offs for selective denormalization.
- Define synchronization semantics for intentional redundancy.
- Document accepted anomalies and mitigation mechanisms.
Common Failure Modes
- Denormalization introduced without ownership of refresh logic.
- Over-normalization creates excessive joins for latency-critical paths.
- Hidden duplicated columns diverge silently over time.
Failure Conditions
- Stop when anomaly prevention responsibilities are undefined.
- Stop when denormalization has no measurable performance rationale.
- Escalate when required consistency cannot be maintained at chosen form.