---
name: database-selection
description: |
  Database selection: PostgreSQL as default, Redis for ephemeral, NoSQL comparison,
  specialized databases, polyglot persistence. Use when choosing databases.
allowed-tools: Read, Grep, Glob
---

# Database Selection

## When to use
- Choosing primary database for a new service
- Adding a specialized database (cache, search, analytics, time-series)
- Evaluating polyglot persistence or multi-database architecture

## Core principles
1. **PostgreSQL is the default** — handles 10k TPS, JSONB, full-text search, extensions
2. **Add databases for specific access patterns** — not because it's trendy
3. **Every additional database doubles operational complexity** — worth it only for clear ROI
4. **Consistency model is a product decision** — strong vs eventual affects user experience
5. **Benchmark with YOUR data** — vendor benchmarks are meaningless for your workload

## References available
- `references/relational-comparison.md` — Postgres vs MySQL vs SQLite vs CockroachDB
- `references/nosql-comparison.md` — MongoDB vs DynamoDB vs Cassandra vs Redis use cases
- `references/specialized-databases.md` — TimescaleDB, Neo4j, Pinecone, pgvector, Elasticsearch
- `references/multi-database-patterns.md` — polyglot persistence, CQRS stores, data sync

## Scripts available
- `scripts/analyze-data-model.sh` — reads schema/migration files to suggest database fit

## Assets available
- `assets/database-decision-matrix.md` — fillable template: requirements → recommendation


---
Source attribution: rnavarych
Original project: https://github.com/rnavarych/alpha-engineer/blob/c5b74102c7fd584af3d344ba7c331a7bbec3c729/plugins/billy-milligan/skills/architecture/database-selection/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Dave AI.

## Upstream license notice

MIT License

Copyright (c) 2024-2026 Raman Navarych

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Dave AI resource metadata

Creator / publisher: rnavarych
Original project: https://github.com/rnavarych/alpha-engineer/blob/c5b74102c7fd584af3d344ba7c331a7bbec3c729/plugins/billy-milligan/skills/architecture/database-selection/SKILL.md
Attribution basis: Source repository record

Fields of work: Data & Analytics, Development & Engineering, Product Management
Roles: Data Analyst, Data Engineer, Database Administrator, ML / AI Engineer, Product Manager
Specialties: Database
Tools: Elasticsearch, MongoDB, Cockroachdb, PostgreSQL, Redis
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: b0b651e6b005eeaa3f875c8ce94316715d4bb1ff8361836113077d68a5880ff2
