Database Design Skill
Use When
- Persistent data structures must be specified before implementation or migration.
Do Not Use When
- Do not use to design API payloads, bypass domain ownership, or optimise from guessed queries.
Required Inputs
| Artefact |
Source or provider |
Required? |
Missing behaviour |
| Approved entity rules and access patterns |
SRS, HLD and API contracts |
Required |
Stop if ownership, lifecycle or identifiers are unresolved. |
| Workload, tenancy, retention and migration constraints |
Operations, security and data owners |
Required |
Qualify absent volume evidence and avoid speculative indexes. |
Workflow
- Read the named inputs and confirm their approval, version and unresolved decisions.
- Apply the decision rules below before drafting; stop on a missing authority, unsafe assumption or unresolved scope driver.
- Produce the Database Design, entity model, data dictionary and migration plan through the existing domain procedure and load only the references needed for the chosen branch.
- Trace each material statement in the Database Design, entity model, data dictionary and migration plan to an input, decision or explicitly qualified assumption.
- Verify the observable acceptance conditions, record unassessed checks, and hand the artefacts to their named consumers.
- If validation fails, recover by correcting the source decision or artefact and rerun the affected check; do not weaken the acceptance condition.
Outputs
| Artefact |
Consumer |
Observable acceptance condition |
| Database Design, entity model, data dictionary and migration plan |
Backend, data, test, security and operations teams |
Constraints enforce invariants; indexes map to named access patterns; migration has rollback and verification; sensitive data has retention and access rules. |
Evidence Produced
| Evidence |
Consumer |
Acceptance condition |
| Source and decision trace |
Reviewer and downstream owner |
Each material statement cites an approved input, named decision or qualified open issue. |
| Completed verification record |
Release or phase gate owner |
Every applicable check records pass/fail; unavailable checks remain not assessed. |
Capability and permission boundaries
Read-only is the default for analysis, review, evaluation and planning. Read and search access to authorised project artefacts are required. Editing is limited to an explicitly requested project deliverable. Execution may run document, syntax or validation checks. Network access is used only for facts that require current verification. Do not publish, spend, change production, approve policy, or claim certification without explicit authority.
Degraded mode
If any required capability is unavailable, return the narrowest useful qualified Database Design, entity model, data dictionary and migration plan draft plus a gap register showing the missing item, affected sections, risk and owner. Never convert an unassessed check into a pass.
Decision Rules
| Choice |
Action |
Failure or risk avoided |
| Invariant must hold for every writer |
Enforce with schema constraint where possible |
Application bypass cannot corrupt data |
| Index has no named access pattern |
Omit pending evidence |
Write cost and storage are not wasted |
Quality Standards
- Preserve repository terminology and trace every material choice to project context.
- Use deterministic acceptance conditions; replace vague quality claims with an observable check, threshold or named approval.
- Cover error, empty, edge, recovery and operational cases relevant to this skill.
- Verify standards, citations, APIs and package names before relying on them; qualify what cannot be checked.
- Stop release for a failed safety, security, legal, financial, accessibility or data-integrity gate.
Anti-Patterns
- Using an ERD without constraints. Fix: specify keys, nullability, uniqueness and checks.
- Adding indexes by intuition. Fix: map each index to a measured query pattern.
- Using destructive migration without rollback. Fix: stage, backfill, verify and cut over.
- Ignoring tenant keys. Fix: define isolation and composite-key rules.
- Storing derived balances as source truth. Fix: define canonical records and rebuild rules.
References
Overview
Produces comprehensive database design documentation including a visual Entity-Relationship Diagram (Mermaid erDiagram), normalized table definitions, indexing strategy, constraint specifications, migration plan, and a complete data dictionary. This skill can run after HLD is complete and may execute in parallel with API Specification (03-api-specification). MANDATORY: When the target platform is MySQL, this skill SHALL integrate with skills/mysql-best-practices/ and apply all rules defined therein.
When to Use
- After
HLD.md exists in projects/<ProjectName>/<phase>/<document>/ and identifies data storage components.
- SRS Section 3.2 (Functional Requirements) provides entity candidates and business logic.
business_rules.md in projects/<ProjectName>/_context/ provides data relationships, validation rules, and constraints.
tech_stack.md in projects/<ProjectName>/_context/ specifies the database platform.
Quick Reference
| Attribute |
Value |
| Inputs |
projects/<ProjectName>/<phase>/<document>/SRS_Draft.md, projects/<ProjectName>/<phase>/<document>/HLD.md, projects/<ProjectName>/_context/business_rules.md, projects/<ProjectName>/_context/tech_stack.md |
| Outputs |
projects/<ProjectName>/<phase>/<document>/Database_Design.md, projects/<ProjectName>/<phase>/<document>/erd.mmd |
| Tone |
Schema-precise, normalized, constraint-heavy |
| Standard |
IEEE 1016-2009 Sec 6.7, ISO/IEC 25010 |
Input Files
| File |
Location |
Required |
Purpose |
| SRS_Draft.md |
projects/<ProjectName>/<phase>/<document>/SRS_Draft.md |
Yes |
Entity candidates from Section 3.2, data objects from Section 2.0 |
| HLD.md |
projects/<ProjectName>/<phase>/<document>/HLD.md |
Yes |
Data storage components, architectural context, data flow paths |
| business_rules.md |
projects/<ProjectName>/_context/business_rules.md |
Yes |
Data relationships, validation constraints, business logic rules |
| tech_stack.md |
projects/<ProjectName>/_context/tech_stack.md |
Yes |
Database platform (MySQL 8.x, PostgreSQL, etc.), version constraints |
Output Files
| File |
Location |
Description |
| Database_Design.md |
projects/<ProjectName>/<phase>/<document>/Database_Design.md |
Complete database design document with all sections |
| erd.mmd |
projects/<ProjectName>/<phase>/<document>/erd.mmd |
Standalone Mermaid erDiagram file for the entity-relationship model |
Core Instructions
Follow these eleven steps in order. Halt and notify the user if a required input file is missing.
Step 1: Read Context Files
Read SRS_Draft.md and HLD.md from projects/<ProjectName>/<phase>/<document>/, and business_rules.md and tech_stack.md from projects/<ProjectName>/_context/. Log the absolute path of each file read. If any required file is missing, halt execution and report the gap.
Step 2: Determine Database Platform
Parse tech_stack.md to identify the target database platform (MySQL 8.x, PostgreSQL, MariaDB, etc.). If the platform is MySQL or MariaDB, load and apply skills/mysql-best-practices/ rules MANDATORILY for all subsequent steps. Document the platform version and any engine-specific constraints (e.g., InnoDB for MySQL).
Step 3: Extract Entities
Extract entity candidates from SRS Section 3.2 (functional requirements) and Section 2.0 (data objects). Each entity becomes a table candidate. Cross-reference with business_rules.md to identify additional entities implied by relationships or constraints. List all identified entities with a one-sentence description.
Step 4: Generate ERD
Produce an Entity-Relationship Diagram using Mermaid erDiagram syntax. Include all entities with typed attributes, relationships with proper cardinality notation (||--o{, ||--|{, }o--o{), and junction tables for every many-to-many relationship. Write the diagram to projects/<ProjectName>/<phase>/<document>/erd.mmd.
Step 5: Verify Normalization
Analyze every table against normalization forms:
- 1NF: Atomic values only, no repeating groups.
- 2NF: No partial dependencies on composite keys.
- 3NF: No transitive dependencies.
Document any intentional denormalization with a performance rationale citing specific query patterns or SRS requirements that justify the deviation.
Step 6: Generate Table Definitions
For each table, specify: column name, data type, nullable flag, default value, and constraints (PK, FK, UNIQUE, CHECK, NOT NULL). Monetary values SHALL use DECIMAL(19,4) per the logic-modeling convention. Every table SHALL include id (PK), created_at, and updated_at audit columns. Include deleted_at for soft-delete tables where business rules require data retention.
Step 7: Define Relationships and Foreign Keys
For every foreign key, explicitly state: parent table, child table, column mapping, ON DELETE action (CASCADE, SET NULL, RESTRICT), and ON UPDATE action. Referential integrity SHALL be enforced at the database level. Foreign key columns SHALL be indexed.
Step 8: Define Indexing Strategy
Define indexes for each table with rationale:
- Primary key indexes: Every table (automatic).
- Unique indexes: Natural keys (email, username, slug).
- Foreign key indexes: Every FK column.
- Composite indexes: Common query patterns (include column order rationale).
- Full-text indexes: Search fields where applicable.
Step 9: Generate Data Dictionary
Produce a comprehensive data dictionary covering every field across all tables:
| Table |
Field |
Type |
Description |
Constraints |
Example Value |
Every column in every table SHALL appear in this dictionary.
Step 10: Define Migration Strategy
Document the migration approach: versioned migrations (up/down scripts), seed data for reference tables, rollback procedures for each migration, and environment-specific considerations (dev, staging, production).
Step 11: Multi-Tenancy and Final Output
If multi-tenancy is detected in SRS or HLD, define the tenant isolation strategy: shared database with tenant_id FK on every tenant-scoped table, or separate schemas. The tenant_id column SHALL have a foreign key constraint and be included in composite indexes for query performance. Write Database_Design.md and erd.mmd to projects/<ProjectName>/<phase>/<document>/. Log total table count, column count, and relationship count.
Output Format
The generated Database_Design.md shall use this section structure with a Document Header (Date, Version, Authors, Standard, Database Platform), followed by nine sections:
- Entity-Relationship Diagram -- Mermaid erDiagram block with typed attributes and cardinality
- Normalization Analysis -- 1NF/2NF/3NF verification per table; denormalization rationale
- Table Definitions -- One subsection per table with Column/Type/Nullable/Default/Constraints columns
- Relationships and Foreign Keys -- FK definitions with ON DELETE/ON UPDATE cascade rules
- Indexing Strategy -- Index definitions with rationale per table
- Data Dictionary -- Table/Field/Type/Description/Constraints/Example Value for every column
- Migration Strategy -- Versioned migrations (up/down), seed data, rollback procedures
- Multi-Tenancy -- Tenant isolation strategy (if applicable)
- Traceability Matrix -- Table/SRS Section/Requirement IDs/Business Rule mapping
Example ERD block:
erDiagram
USERS ||--o{ ORDERS : places
USERS {
int id PK
varchar email UK
varchar name
timestamp created_at
timestamp updated_at
}
ORDERS ||--|{ ORDER_ITEMS : contains
ORDERS {
int id PK
int user_id FK
decimal total_amount
varchar status
timestamp created_at
timestamp updated_at
}
Common Pitfalls
| Pitfall |
Remedy |
| Missing indexes on foreign keys |
Every FK column SHALL have a corresponding index |
| No cascade rules defined |
Every FK SHALL specify ON DELETE and ON UPDATE actions |
| Monetary values not using DECIMAL(19,4) |
All currency/monetary columns SHALL use DECIMAL(19,4) |
| Missing soft delete columns |
Tables with data retention rules SHALL include deleted_at |
| No audit columns |
Every table SHALL have created_at and updated_at columns |
| Denormalization without rationale |
Document the performance justification for every deviation from 3NF |
Verification Checklist
Integration
| Direction |
Skill |
Relationship |
| Upstream |
01-high-level-design |
Consumes HLD.md for data storage components and data flow paths |
| Downstream |
Phase 04 (Development) |
Provides schema definitions for ORM models and migration scripts |
| Downstream |
Phase 05 (Testing) |
Provides table structure for data integrity and constraint test cases |
| Mandatory Ref |
skills/mysql-best-practices/ |
Applied when MySQL or MariaDB is the target platform |
Standards
- IEEE 1016-2009 Sec 6.7 -- Data design viewpoint: entity definitions, relationships, constraints, and data dictionary
- ISO/IEC 25010 -- Quality model for data integrity, performance efficiency, and reliability characteristics
Resources
logic.prompt -- Executable prompt containing the step-by-step database design generation logic.
README.md -- Quick-start guide for this skill.
1---2name: 04-database-design3description: Use when approved requirements and access patterns need an entity model, normalised schema, keys, constraints, indexes, tenancy, retention and migration plan; use HLD for ownership and accounting-engine-design for ledger invariants.4---5# Database Design Skill6<!-- dual-compat-start -->7## Use When89- Persistent data structures must be specified before implementation or migration.1011## Do Not Use When1213- Do not use to design API payloads, bypass domain ownership, or optimise from guessed queries.1415## Required Inputs1617| Artefact | Source or provider | Required? | Missing behaviour |18|---|---|---|---|19| Approved entity rules and access patterns | SRS, HLD and API contracts | Required | Stop if ownership, lifecycle or identifiers are unresolved. |20| Workload, tenancy, retention and migration constraints | Operations, security and data owners | Required | Qualify absent volume evidence and avoid speculative indexes. |2122## Workflow23241. Read the named inputs and confirm their approval, version and unresolved decisions.252. Apply the decision rules below before drafting; stop on a missing authority, unsafe assumption or unresolved scope driver.263. Produce the Database Design, entity model, data dictionary and migration plan through the existing domain procedure and load only the references needed for the chosen branch.274. Trace each material statement in the Database Design, entity model, data dictionary and migration plan to an input, decision or explicitly qualified assumption.285. Verify the observable acceptance conditions, record unassessed checks, and hand the artefacts to their named consumers.296. If validation fails, recover by correcting the source decision or artefact and rerun the affected check; do not weaken the acceptance condition.3031## Outputs3233| Artefact | Consumer | Observable acceptance condition |34|---|---|---|35| Database Design, entity model, data dictionary and migration plan | Backend, data, test, security and operations teams | Constraints enforce invariants; indexes map to named access patterns; migration has rollback and verification; sensitive data has retention and access rules. |3637## Evidence Produced3839| Evidence | Consumer | Acceptance condition |40|---|---|---|41| Source and decision trace | Reviewer and downstream owner | Each material statement cites an approved input, named decision or qualified open issue. |42| Completed verification record | Release or phase gate owner | Every applicable check records pass/fail; unavailable checks remain `not assessed`. |4344## Capability and permission boundaries4546Read-only is the default for analysis, review, evaluation and planning. Read and search access to authorised project artefacts are required. Editing is limited to an explicitly requested project deliverable. Execution may run document, syntax or validation checks. Network access is used only for facts that require current verification. Do not publish, spend, change production, approve policy, or claim certification without explicit authority.4748## Degraded mode4950If any required capability is unavailable, return the narrowest useful qualified Database Design, entity model, data dictionary and migration plan draft plus a gap register showing the missing item, affected sections, risk and owner. Never convert an unassessed check into a pass.5152## Decision Rules5354| Choice | Action | Failure or risk avoided |55|---|---|---|56| Invariant must hold for every writer | Enforce with schema constraint where possible | Application bypass cannot corrupt data |57| Index has no named access pattern | Omit pending evidence | Write cost and storage are not wasted |5859## Quality Standards6061- Preserve repository terminology and trace every material choice to project context.62- Use deterministic acceptance conditions; replace vague quality claims with an observable check, threshold or named approval.63- Cover error, empty, edge, recovery and operational cases relevant to this skill.64- Verify standards, citations, APIs and package names before relying on them; qualify what cannot be checked.65- Stop release for a failed safety, security, legal, financial, accessibility or data-integrity gate.6667## Anti-Patterns6869- Using an ERD without constraints. Fix: specify keys, nullability, uniqueness and checks.70- Adding indexes by intuition. Fix: map each index to a measured query pattern.71- Using destructive migration without rollback. Fix: stage, backfill, verify and cut over.72- Ignoring tenant keys. Fix: define isolation and composite-key rules.73- Storing derived balances as source truth. Fix: define canonical records and rebuild rules.7475## References7677- [HLD neighbour](../01-high-level-design/SKILL.md)78- [API Specification neighbour](../03-api-specification/SKILL.md)79- [Accounting Engine Design neighbour](../16-accounting-engine-design/SKILL.md)80<!-- dual-compat-end -->8182838485## Overview8687Produces comprehensive database design documentation including a visual Entity-Relationship Diagram (Mermaid erDiagram), normalized table definitions, indexing strategy, constraint specifications, migration plan, and a complete data dictionary. This skill can run after HLD is complete and may execute in parallel with API Specification (03-api-specification). **MANDATORY:** When the target platform is MySQL, this skill SHALL integrate with `skills/mysql-best-practices/` and apply all rules defined therein.8889## When to Use9091- After `HLD.md` exists in `projects/<ProjectName>/<phase>/<document>/` and identifies data storage components.92- SRS Section 3.2 (Functional Requirements) provides entity candidates and business logic.93- `business_rules.md` in `projects/<ProjectName>/_context/` provides data relationships, validation rules, and constraints.94- `tech_stack.md` in `projects/<ProjectName>/_context/` specifies the database platform.9596## Quick Reference9798| Attribute | Value |99|-------------|-------|100| **Inputs** | `projects/<ProjectName>/<phase>/<document>/SRS_Draft.md`, `projects/<ProjectName>/<phase>/<document>/HLD.md`, `projects/<ProjectName>/_context/business_rules.md`, `projects/<ProjectName>/_context/tech_stack.md` |101| **Outputs** | `projects/<ProjectName>/<phase>/<document>/Database_Design.md`, `projects/<ProjectName>/<phase>/<document>/erd.mmd` |102| **Tone** | Schema-precise, normalized, constraint-heavy |103| **Standard** | IEEE 1016-2009 Sec 6.7, ISO/IEC 25010 |104105## Input Files106107| File | Location | Required | Purpose |108|------|----------|----------|---------|109| SRS_Draft.md | `projects/<ProjectName>/<phase>/<document>/SRS_Draft.md` | Yes | Entity candidates from Section 3.2, data objects from Section 2.0 |110| HLD.md | `projects/<ProjectName>/<phase>/<document>/HLD.md` | Yes | Data storage components, architectural context, data flow paths |111| business_rules.md | `projects/<ProjectName>/_context/business_rules.md` | Yes | Data relationships, validation constraints, business logic rules |112| tech_stack.md | `projects/<ProjectName>/_context/tech_stack.md` | Yes | Database platform (MySQL 8.x, PostgreSQL, etc.), version constraints |113114## Output Files115116| File | Location | Description |117|------|----------|-------------|118| Database_Design.md | `projects/<ProjectName>/<phase>/<document>/Database_Design.md` | Complete database design document with all sections |119| erd.mmd | `projects/<ProjectName>/<phase>/<document>/erd.mmd` | Standalone Mermaid erDiagram file for the entity-relationship model |120121## Core Instructions122123Follow these eleven steps in order. Halt and notify the user if a required input file is missing.124125### Step 1: Read Context Files126127Read `SRS_Draft.md` and `HLD.md` from `projects/<ProjectName>/<phase>/<document>/`, and `business_rules.md` and `tech_stack.md` from `projects/<ProjectName>/_context/`. Log the absolute path of each file read. If any required file is missing, halt execution and report the gap.128129### Step 2: Determine Database Platform130131Parse `tech_stack.md` to identify the target database platform (MySQL 8.x, PostgreSQL, MariaDB, etc.). If the platform is MySQL or MariaDB, load and apply `skills/mysql-best-practices/` rules MANDATORILY for all subsequent steps. Document the platform version and any engine-specific constraints (e.g., InnoDB for MySQL).132133### Step 3: Extract Entities134135Extract entity candidates from SRS Section 3.2 (functional requirements) and Section 2.0 (data objects). Each entity becomes a table candidate. Cross-reference with `business_rules.md` to identify additional entities implied by relationships or constraints. List all identified entities with a one-sentence description.136137### Step 4: Generate ERD138139Produce an Entity-Relationship Diagram using Mermaid erDiagram syntax. Include all entities with typed attributes, relationships with proper cardinality notation (`||--o{`, `||--|{`, `}o--o{`), and junction tables for every many-to-many relationship. Write the diagram to `projects/<ProjectName>/<phase>/<document>/erd.mmd`.140141### Step 5: Verify Normalization142143Analyze every table against normalization forms:144- **1NF:** Atomic values only, no repeating groups.145- **2NF:** No partial dependencies on composite keys.146- **3NF:** No transitive dependencies.147148Document any intentional denormalization with a performance rationale citing specific query patterns or SRS requirements that justify the deviation.149150### Step 6: Generate Table Definitions151152For each table, specify: column name, data type, nullable flag, default value, and constraints (PK, FK, UNIQUE, CHECK, NOT NULL). Monetary values SHALL use `DECIMAL(19,4)` per the logic-modeling convention. Every table SHALL include `id` (PK), `created_at`, and `updated_at` audit columns. Include `deleted_at` for soft-delete tables where business rules require data retention.153154### Step 7: Define Relationships and Foreign Keys155156For every foreign key, explicitly state: parent table, child table, column mapping, `ON DELETE` action (CASCADE, SET NULL, RESTRICT), and `ON UPDATE` action. Referential integrity SHALL be enforced at the database level. Foreign key columns SHALL be indexed.157158### Step 8: Define Indexing Strategy159160Define indexes for each table with rationale:161- **Primary key indexes:** Every table (automatic).162- **Unique indexes:** Natural keys (email, username, slug).163- **Foreign key indexes:** Every FK column.164- **Composite indexes:** Common query patterns (include column order rationale).165- **Full-text indexes:** Search fields where applicable.166167### Step 9: Generate Data Dictionary168169Produce a comprehensive data dictionary covering every field across all tables:170171| Table | Field | Type | Description | Constraints | Example Value |172|-------|-------|------|-------------|-------------|---------------|173174Every column in every table SHALL appear in this dictionary.175176### Step 10: Define Migration Strategy177178Document the migration approach: versioned migrations (up/down scripts), seed data for reference tables, rollback procedures for each migration, and environment-specific considerations (dev, staging, production).179180### Step 11: Multi-Tenancy and Final Output181182If multi-tenancy is detected in SRS or HLD, define the tenant isolation strategy: shared database with `tenant_id` FK on every tenant-scoped table, or separate schemas. The `tenant_id` column SHALL have a foreign key constraint and be included in composite indexes for query performance. Write `Database_Design.md` and `erd.mmd` to `projects/<ProjectName>/<phase>/<document>/`. Log total table count, column count, and relationship count.183184## Output Format185186The generated `Database_Design.md` shall use this section structure with a Document Header (Date, Version, Authors, Standard, Database Platform), followed by nine sections:1871881. **Entity-Relationship Diagram** -- Mermaid erDiagram block with typed attributes and cardinality1892. **Normalization Analysis** -- 1NF/2NF/3NF verification per table; denormalization rationale1903. **Table Definitions** -- One subsection per table with Column/Type/Nullable/Default/Constraints columns1914. **Relationships and Foreign Keys** -- FK definitions with ON DELETE/ON UPDATE cascade rules1925. **Indexing Strategy** -- Index definitions with rationale per table1936. **Data Dictionary** -- Table/Field/Type/Description/Constraints/Example Value for every column1947. **Migration Strategy** -- Versioned migrations (up/down), seed data, rollback procedures1958. **Multi-Tenancy** -- Tenant isolation strategy (if applicable)1969. **Traceability Matrix** -- Table/SRS Section/Requirement IDs/Business Rule mapping197198Example ERD block:199200```mermaid201erDiagram202 USERS ||--o{ ORDERS : places203 USERS {204 int id PK205 varchar email UK206 varchar name207 timestamp created_at208 timestamp updated_at209 }210 ORDERS ||--|{ ORDER_ITEMS : contains211 ORDERS {212 int id PK213 int user_id FK214 decimal total_amount215 varchar status216 timestamp created_at217 timestamp updated_at218 }219```220221## Common Pitfalls222223| Pitfall | Remedy |224|---------|--------|225| Missing indexes on foreign keys | Every FK column SHALL have a corresponding index |226| No cascade rules defined | Every FK SHALL specify ON DELETE and ON UPDATE actions |227| Monetary values not using DECIMAL(19,4) | All currency/monetary columns SHALL use DECIMAL(19,4) |228| Missing soft delete columns | Tables with data retention rules SHALL include deleted_at |229| No audit columns | Every table SHALL have created_at and updated_at columns |230| Denormalization without rationale | Document the performance justification for every deviation from 3NF |231232## Verification Checklist233234- [ ] `Database_Design.md` and `erd.mmd` exist in `projects/<ProjectName>/<phase>/<document>/`.235- [ ] ERD renders correctly in Mermaid erDiagram syntax.236- [ ] All tables have primary keys defined.237- [ ] Foreign keys have ON DELETE and ON UPDATE cascade rules defined.238- [ ] Monetary columns use `DECIMAL(19,4)`.239- [ ] Data dictionary covers every field in every table.240- [ ] `skills/mysql-best-practices/` rules applied if MySQL or MariaDB detected.241242## Integration243244| Direction | Skill | Relationship |245|-----------|-------|-------------|246| Upstream | 01-high-level-design | Consumes `HLD.md` for data storage components and data flow paths |247| Downstream | Phase 04 (Development) | Provides schema definitions for ORM models and migration scripts |248| Downstream | Phase 05 (Testing) | Provides table structure for data integrity and constraint test cases |249| Mandatory Ref | `skills/mysql-best-practices/` | Applied when MySQL or MariaDB is the target platform |250251## Standards252253- **IEEE 1016-2009 Sec 6.7** -- Data design viewpoint: entity definitions, relationships, constraints, and data dictionary254- **ISO/IEC 25010** -- Quality model for data integrity, performance efficiency, and reliability characteristics255256## Resources257258- `logic.prompt` -- Executable prompt containing the step-by-step database design generation logic.259- `README.md` -- Quick-start guide for this skill.