umlforge_erd_schema
Design a database schema with ERD, integrity rules, and index recommendations. Provides entity diagrams, schema narrative, and N+1 risk flags.
Instructions
Design a database schema with ERD, integrity rules, and index recommendations.
USE THIS WHEN:
You are designing or reviewing a database schema
You need an ERD with foreign keys, cardinality, and data types
You want index recommendations and N+1 risk flags
NOT FOR:
Full codebase analysis (which may include DB) → use umlforge_reverse_engineer
API flows between services → use umlforge_api_sequence
Event-driven data pipelines → use umlforge_event_driven
Produces:
erDiagram: entities with typed attributes, cardinality, FK labels
Schema narrative: one paragraph per entity — purpose, index recommendations, denormalisation decisions
Data integrity checklist: uniqueness, FK integrity, null policies, constraints
N+1 query risk flags
(report_mode=True) Design Score: Normalisation, Query Performance, Data Integrity (A–F)
Args: domain_description: What the database stores (e.g. "E-commerce: users, products, orders, payments"). entities: Known entities and key attributes (e.g. "User(id, email, tier), Order(id, user_id, status, total)"). access_patterns: Most frequent read/write queries (optional — used for index recommendations). db_technology: Database technology (default: PostgreSQL). report_mode: True → also produce a Design Score report. Pro/Team/Enterprise only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entities | Yes | ||
| report_mode | No | ||
| db_technology | No | PostgreSQL | |
| access_patterns | No | ||
| domain_description | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |