aj-geddes avatar

Database Schema Design

Handles the fundamentals of relational database design with a focus on normalization forms and relationship patterns. You'll use this when you're designing schemas from scratch or refactoring existing ones that have grown messy. It walks through 1NF, 2NF, and 3NF with concrete examples of eliminating repeating groups, partial dependencies, and transitive dependencies. Covers both PostgreSQL and MySQL. The approach is straightforward and example-driven, showing you the wrong way and the right way side by side. Honestly, if you already know your normal forms well, this is basic, but it's solid for getting teams on the same page about schema design principles.

skills.sh installs
597
GitHub stars
379
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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()
);

Sponsors

Details

Repository
github.com/aj-geddes/useful-ai-prompts
Categories
Backend & APIs, AI & Agent Building, Productivity & Planning, Design & UI/UX, Databases
First seen
Jun 3, 2026

More from aj-geddes/useful-ai-prompts

All 258
1bobmatnyc avatarapi-design-patternsbobmatnyc/claude-mpm-skillsComprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices579skills.sh installs
2glitternetwork avatarpinme-authglitternetwork/pinmeUse when a PinMe project (Worker TypeScript) needs to integrate user authentication — creating email/password users, verifying id_tokens, querying user info, or511skills.sh installs
3intellectronica avatarraindrop-apiintellectronica/agent-skillsThis skill provides comprehensive instructions for interacting with the Raindrop.io bookmarks service via its REST API using curl and jq. It covers authenticati507skills.sh installs
4secondsky avatarapi-security-hardeningsecondsky/claude-skillsREST API security hardening with authentication, rate limiting, input validation, security headers. Use for production APIs, security audits, defense-in-depth, 506skills.sh installs
5aj-geddes avatardatabase-migration-managementaj-geddes/useful-ai-promptsManage database migrations and schema versioning. Use when planning migrations, version control, rollback strategies, or data transformations in PostgreSQL and 504skills.sh installs
6aj-geddes avatarapi-reference-documentationaj-geddes/useful-ai-promptsCreate comprehensive API reference documentation with OpenAPI/Swagger specs, REST endpoints, authentication, examples, and SDKs. Use when documenting REST APIs,499skills.sh installs