Database Schema Documentation

Database Schema Documentation

Teaches an agent to document database schemas with ERD diagrams, table definitions, indexes, constraints and a data dictionary.

Skill files8 files

references/

scripts/

templates/

SKILL.md100 lines
1
---
2
name: database-schema-documentation
3
description: >
4
Document database schemas, ERD diagrams, table relationships, indexes, and
5
constraints. Use when documenting database schema, creating ERD diagrams, or
6
writing table documentation.
7
---
8
9
# Database Schema Documentation
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
Create comprehensive database schema documentation including entity relationship diagrams (ERD), table definitions, indexes, constraints, and data dictionaries.
22
23
## When to Use
24
25
- Database schema documentation
26
- ERD (Entity Relationship Diagrams)
27
- Data dictionary creation
28
- Table relationship documentation
29
- Index and constraint documentation
30
- Migration documentation
31
- Database design specs
32
33
## Quick Start
34
35
Minimal working example:
36
37
````markdown
38
# Database Schema Documentation
39
40
**Database:** PostgreSQL 14.x
41
**Version:** 2.0
42
**Last Updated:** 2025-01-15
43
**Schema Version:** 20250115120000
44
45
## Overview
46
47
This database supports an e-commerce application with user management, product catalog, orders, and payment processing.
48
49
## Entity Relationship Diagram
50
51
```mermaid
52
erDiagram
53
users ||--o{ orders : places
54
users ||--o{ addresses : has
55
users ||--o{ payment_methods : has
56
orders ||--|{ order_items : contains
57
orders ||--|| payments : has
58
products ||--o{ order_items : includes
59
products }o--|| categories : belongs_to
60
products ||--o{ product_images : has
61
products ||--o{ inventory : tracks
62
63
// ... (see reference guides for full implementation)
64
```
65
66
## Reference Guides
67
68
Detailed implementations in the `references/` directory:
69
70
| Guide | Contents |
71
|---|---|
72
| [users](references/users.md) | users |
73
| [products](references/products.md) | products |
74
| [orders](references/orders.md) | orders |
75
| [order_items](references/orderitems.md) | order_items |
76
| [Enum Types](references/enum-types.md) | Enum Types, JSONB Structures |
77
78
## Best Practices
79
80
### ✅ DO
81
82
- Document all tables and columns
83
- Create ERD diagrams
84
- Document indexes and constraints
85
- Include sample data
86
- Document foreign key relationships
87
- Show JSONB field structures
88
- Document triggers and functions
89
- Include migration scripts
90
- Specify data types precisely
91
- Document performance considerations
92
93
### ❌ DON'T
94
95
- Skip constraint documentation
96
- Forget to version schema changes
97
- Ignore performance implications
98
- Skip index documentation
99
- Forget to document enum values
100

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…