Skeema Logo
Skeema
Sign inGet started →
Analysis & intelligence

Schema health

A linter for your database design. Skeema checks every ER schema against nine static rules and grades it 0–100, catching the issues that cause data bugs and slow queries before they reach production.

Why validate a schema?

Schema mistakes are expensive because they’re hard to undo once data lands. A missing index turns a fast query slow at scale; a missing unique constraint lets duplicates in; a missing foreign-key index makes joins crawl. Schema health catches these at design time, when they’re free to fix.

The nine rules

RuleSeverityWhy it matters
Missing primary keyErrorRows can’t be uniquely identified or referenced.
Missing timestampsWarningNo created_at / updated_at makes auditing and sorting hard.
Enum candidateInfoA status string with few values should be a constrained enum.
Missing UNIQUEWarningNatural keys (email) without UNIQUE allow duplicates.
Missing FK indexInfoUnindexed foreign keys make joins slow at scale.
Orphan entityInfoA table with no relationships is often a modeling mistake.
Redundant columnsWarningDuplicated data risks update anomalies — denormalize on purpose only.
Naming consistencyInfoMixed snake_case / camelCase makes the schema harder to use.
Wide entityWarningA table with too many columns often wants splitting.

How the score works

The grade is a simple, transparent formula:

Scoring
score = 100 − (10 × errors) − (4 × warnings) − (1 × infos), clamped to 0–100, then mapped to a letter grade (A ≥ 90, B ≥ 80, C ≥ 70, D ≥ 60, else F). Errors hurt most because they cause correctness bugs; infos are gentle nudges.

Static rules vs AI suggestions

The nine rules are static — deterministic, instant, and free. For deeper review, opt into AI suggestions, which look at normalization (3NF), soft-delete patterns, and modeling improvements the static rules don’t cover. The AI is explicitly told not to repeat static-rule territory, so the two are complementary.

Key takeaways
  • Schema health is a design-time linter — fix data issues before data exists.
  • Nine rules cover keys, indexes, constraints, normalization, and naming.
  • Score = 100 − 10·errors − 4·warnings − 1·infos, graded A–F.
  • Static rules are instant and free; opt into AI suggestions for deeper normalization advice.