# database-management-patterns

A reference skill for PostgreSQL and MongoDB work: schema design, indexing, transactions, replication and sharding.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 466 installs · ★ 62
- Author: manutej
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/manutej/luxor-claude-marketplace/tree/HEAD/plugins/luxor-database-pro/skills/database-management-patterns/SKILL.md
- Updated: 2026-06-13
- HTML: https://affpapa.org/en/nevibecode/skills/database-management-patterns

## What it does

The skill hands your agent ready-made patterns for database work. It opens with a comparison of relational and document stores, then walks through ACID and the CAP theorem, plus normal forms from 1NF to 3NF and the cases where denormalising pays off. The PostgreSQL section shows `CREATE TABLE` examples with `SERIAL`, `UUID` and composite primary keys, foreign keys using `ON DELETE CASCADE`, `SET NULL` and `RESTRICT`, and check plus partial unique constraints. Triggers and functions come next, though the source cuts off there.

The useful part is the material on indexing, transactions, replication and sharding for busy applications. Reach for it when you have to pick between SQL and NoSQL for a specific job, or when a query plan needs explaining after a slowdown.

Install runs through `npx skills add` with a platform flag: `-a claude-code`, `-a codex`, `-a cursor`, `-a gemini-cli` or `-a opencode`. GitHub Copilot uses a different command, `gh skill install`. The skill file lands in the platform's directory, for example `~/.claude/skills/database-management-patterns/SKILL.md`.

## Requirements
- Works with: PostgreSQL, MongoDB

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill database-management-patterns -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/database-management-patterns/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/database-management-patterns/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill database-management-patterns -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/database-management-patterns/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill database-management-patterns -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/database-management-patterns/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install manutej/luxor-claude-marketplace database-management-patterns
```

2. **Manually: put the files in place**
- File: `.github/skills/database-management-patterns/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill database-management-patterns -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/manutej/luxor-claude-marketplace --path plugins/luxor-database-pro/skills/database-management-patterns
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/database-management-patterns/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add manutej/luxor-claude-marketplace --skill database-management-patterns -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/manutej/luxor-claude-marketplace/tree/HEAD/plugins/luxor-database-pro/skills/database-management-patterns/SKILL.md

## When to use it
- design a table schema with keys and constraints
- pick between PostgreSQL and MongoDB for a job
- decide when denormalising is worth it
- set up cascading deletes and referential integrity
- plan how to scale a database with replication and sharding

## Example prompts
- Design a schema for orders and order items in PostgreSQL
- Compare PostgreSQL and MongoDB for storing event logs
- Why isn't this query using the index? Walk me through the plan

## Similar
- [databases](https://affpapa.org/en/nevibecode/skills/databases.md) — skill · 435 installs
- [optimize-database-performance](https://affpapa.org/en/nevibecode/commands/optimize-database-performance.md) — command · 794 installs
- [database-administrator](https://affpapa.org/en/nevibecode/agents/database-administrator.md) — subagent · 452 installs
- [nosql-database-design](https://affpapa.org/en/nevibecode/skills/nosql-database-design.md) — skill · 486 installs
- [database-design](https://affpapa.org/en/nevibecode/skills/moizibnyousaf-database-design.md) — skill · 604 installs
- [database-indexing-strategy](https://affpapa.org/en/nevibecode/skills/database-indexing-strategy.md) — skill · 486 installs

From the same set: [manutej/luxor-claude-marketplace](https://affpapa.org/en/nevibecode/by/manutej/luxor-claude-marketplace.md) — 38 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
