database-design-document

Solid

Design a production database schema including ERD, table definitions, data dictionary, indexing strategy, normalization decisions, and migration plan. Use when designing a new database, adding major entities, or documenting an existing schema.

Data & Documents 6 stars 2 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
28
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

## Purpose Produce a database design document that specifies the complete logical and physical data model, including entity relationships, table definitions, column constraints, indexing strategy, and migration plan. **Database schema is the hardest type of technical debt to remediate.** Changing a column name on a 50M-row table is a 4-hour maintenance window. Designing it correctly upfront is a 2-hour design session. ## Input **Works best with:** The domain or system being modeled. **Also valuable:** Business rules, cardinality constraints, known query patterns, performance requirements, existing tables that must integrate. **Example invocation:** `Design the database schema for PayFlow's merchant management system. Merchants have multiple brands, each with their own settings, domains, and staff users. Users have roles with specific permissions. Brands can have multiple currencies and payment methods.` ## Key Concepts ### Normalization - **1NF:** Atomic values. No repeating groups. Single value per cell. - **2NF:** No partial dependencies. Non-key columns depend on the full primary key. - **3NF:** No transitive dependencies. Non-key columns depend only on the primary key. - **BCNF:** Stronger form of 3NF. Every determinant is a candidate key. - **Practical rule:** Design to 3NF minimum. Denormalize intentionally and explicitly for performance, with documentation. ### Indexing Principles - Every foreign key column must have an index. - Columns used in `WHERE`, `JOIN O...

Details

Author
fattain-naime
Repository
fattain-naime/engineering-docs
Created
2 months ago
Last Updated
6 days ago
Language
JavaScript
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category