Skip to content
aj-geddes avatar

Database Schema Design

Normalization-focused schema design guide for PostgreSQL and MySQL covering 1NF through 3NF and entity-relationship patterns.

CCM score
39 of 100
skills.sh installs
601
GitHub stars
396
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers table design from new schemas through normalization analysis, with 1NF, 2NF, and 3NF reference guides
  • Includes a Quick Start that splits a repeating-group product_ids column into an orders and order_items table pair
  • Provides an entity-relationship patterns guide for 1:1, 1:N, and N:N relationships with foreign key constraints
  • Designed for planning data models and table structures for PostgreSQL and MySQL before deployment

Install

$ npx -y skills add aj-geddes/useful-ai-prompts --skill database-schema-design -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Database Schema Design

Table of Contents

Overview

Design scalable, normalized database schemas with proper relationships, constraints, and data types. Includes normalization techniques, relationship patterns, and constraint strategies.

When to Use

  • New database schema design
  • Data model planning
  • Table structure definition
  • Relationship design (1:1, 1:N, N:N)
  • Normalization analysis
  • Constraint and trigger planning
  • Performance optimization at schema level

Quick Start

PostgreSQL - Eliminate Repeating Groups:

-- NOT 1NF: repeating group in single column
CREATE TABLE orders_bad (
  id UUID PRIMARY KEY,
  customer_name VARCHAR(255),
  product_ids VARCHAR(255)  -- "1,2,3" - repeating group
);

-- 1NF: separate table for repeating data
CREATE TABLE orders (
  id UUID PRIMARY KEY,
  customer_name VARCHAR(255),
  created_at TIMESTAMP DEFAULT NOW()
);

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Category
Databases
First seen
Jun 3, 2026

More from aj-geddes/useful-ai-prompts

All 258

Similar to Database Schema Design

More Databases