Schema Quality & Integrity
Referential integrity · Foreign Key coverage · Orphan risk · Composite key analysis · Index efficiency
Schema Score
74
Missing Foreign Keys
4
Orphan Risk
3.2%
Composite Keys
8
Index Efficiency
82%
Schema Score Breakdown
74
/ 100
Primary Key Coverage96%
Foreign Key Coverage78%
Constraint Coverage71%
Index Efficiency82%
Integrity Issues
Missing Foreign Key4
Orphan Rows2
Composite Key Misuse8
Missing Constraints14
Index Coverage by Table
Missing Foreign Key Constraints
4 missing| Source Table | Column | Likely References | Orphan Risk | Impact | Action |
|---|---|---|---|---|---|
| inventory | product_id | products(id) — 99.8% match confidence | High (0.2%) | Join failures · Data drift | Fix |
| notifications | user_id | customers(id) — 97.4% match confidence | Medium (0.8%) | Ghost notifications | Fix |
| analytics_events | session_id | user_sessions(id) — 94.1% match confidence | Low (1.2%) | Orphaned events | Fix |
| audit_log | record_id | Multiple tables — polymorphic pattern | Low (0.0%) | Intentional design |
Orphaned Row Analysis
| Table | Orphaned Rows | % of Table | Foreign Key Column |
|---|---|---|---|
| order_items | 2,341 | 0.024% | order_id |
| analytics_events | 847 | 0.008% | session_id |
| notifications | 124 | 0.001% | user_id |