Relational Schema Normalization Auditor (3NF, BCNF) & Integrity Guard
validate_schema_normalizationAudit database schemas for 3NF compliance, transitive dependencies, and missing foreign keys to prevent update anomalies and validate relational integrity.
Instructions
Audits database schemas for third normal form (3NF) compliance, transitive dependencies, and missing foreign key constraints. Use when reviewing database architectures, preventing update anomalies, or validating relational integrity; for detecting breaking schema migrations, use detect_breaking_migrations instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'schema_ddl' ('target_normal_form' defaults to 'third_normal_form_3nf'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema_ddl | Yes | Database schema DDL statements defining table columns, primary keys, and relations. | |
| strict_keys | No | Whether to enforce explicit foreign key constraints on all ID references. | |
| target_normal_form | No | Target normalization standard: 3NF, Boyce-Codd BCNF, or denormalized OLAP star. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| conforms_to_target | Yes | True if the schema strictly satisfies the chosen normal form requirements. | |
| normalization_score | Yes | Schema relational design quality score on a 0 to 100 scale. | |
| redundancies_flagged | Yes | List of redundant fields, missing primary keys, or transitive dependencies identified. | |
| refactoring_suggestions | Yes | Specific table decomposition and foreign key recommendations to achieve compliance. |