MayrosSkills Hub
Back to browse

schema-designer

ApiliumApiliumv1.0.36600
officialplatinum (7/8)Clean scan

Install

mayros skill install schema-designer
mayros skill install [email protected]

Database normalization, DDL generation, ERD diagrams

README

@apilium/schema-designer

Design relational database schemas with normalization analysis, constraint definitions, DDL generation for PostgreSQL and MySQL, and ERD diagrams in Mermaid syntax.

Installation

mayros skill install @apilium/schema-designer

Usage

Schema Design

Ask Mayros to design a database schema:

Design a schema for an e-commerce platform with users, products, orders, and line items.

The skill produces DDL statements for both PostgreSQL and MySQL, including tables, constraints, indexes, and triggers.

DDL Generation

Generates production-ready DDL with:

  • PRIMARY KEY (identity columns for PostgreSQL, AUTO_INCREMENT for MySQL)
  • FOREIGN KEY with appropriate ON DELETE actions (CASCADE, SET NULL, RESTRICT)
  • UNIQUE, CHECK, NOT NULL, and DEFAULT constraints
  • B-tree, GIN, partial, and covering indexes

Normalization Assessment

The skill analyzes schemas against normal forms:

  • 1NF: atomic values, no repeating groups
  • 2NF: no partial dependencies on composite keys
  • 3NF: no transitive dependencies
  • BCNF: every determinant is a candidate key

It also advises when denormalization is appropriate (read-heavy workloads, reporting, caching).

ERD Diagrams

Generates Mermaid entity-relationship diagrams with table columns, primary keys, foreign keys, and relationship cardinality.

Common Patterns

Includes templates for soft delete, audit timestamps, polymorphic associations, self-referential trees, and many-to-many junction tables.

Semantic Predicates

| Predicate | Description | |-----------|-------------| | schema:designed | Asserted after producing a schema design | | schema:normalization_issue | Asserted for each normalization violation | | schema:design_context | Query for schema evolution history |

License

MIT

Versions

v1.0.3Feb 27, 2026
v1.0.2Feb 27, 2026
v1.0.1Feb 27, 2026
v1.0.0Feb 27, 2026

Comments

Sign in to leave a comment.

Loading comments...