database-engineer

Design and optimize database schemas and queries across relational and NoSQL systems.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Postalocity/template-microsite --skill database-engineer-postalocity
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-engineer
Source: https://github.com/Postalocity/template-microsite/tree/main/.opencode/skills/database-engineer
Command: npx skills add https://github.com/Postalocity/template-microsite --skill database-engineer-postalocity

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database engineers design and optimize data architectures to deliver fast, scalable access, addressing the complexity of schema design, indexing, migrations, and cross-database compatibility.

Core Features & Use Cases

  • Database Systems: PostgreSQL, MySQL, SQLite, SQL Server, MongoDB, Cassandra, Redis, DynamoDB, CockroachDB, TiDB, PlanetScale, Elasticsearch, Meilisearch
  • Schema Design: 3NF normalization, denormalization for read-heavy workloads, appropriate data types, soft deletes with deleted_at timestamps, audit columns (created_at, updated_at, created_by), foreign key constraints
  • Query Optimization: Use EXPLAIN ANALYZE, covering indexes, avoid SELECT * — specify columns, parameterized queries, cursor-based pagination
  • Migration Strategy: Wrap in transactions, batch backfills for large data changes, additive columns first (drop later), concurrent index creation, deprecation periods before removing columns
  • Performance Targets: < 100ms OLTP queries, < 1s OLAP queries, 10-50 connection pool size

Quick Start

Create a starter project to design a sample schema and run a few optimized queries against a sample dataset to observe performance improvements

Frequently Asked Questions about database-engineer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize slow SQL queries to hit sub-100ms performance targets?

To optimize slow SQL queries, use EXPLAIN ANALYZE to inspect execution plans, implement covering indexes, avoid SELECT * by specifying columns, and use cursor-based pagination to reduce latency and hit sub-100ms OLTP targets.

What's the best way to plan database schema migrations without downtime?

The best way to plan zero-downtime database migrations is to wrap changes in transactions, add new columns first before dropping old ones, use concurrent index creation, and batch large data backfills to avoid locking tables.

Does this database engineering approach work with both relational and NoSQL systems?

Yes, this approach works across relational and NoSQL systems. It supports schema design, data modeling, and query optimization for PostgreSQL, MySQL, MongoDB, Cassandra, Redis, DynamoDB, and Elasticsearch environments.

When should I denormalize my database schema instead of using 3NF normalization?

You should denormalize your database schema instead of using 3NF normalization when designing read-heavy workloads, trading strict normalization for faster query retrieval by reducing expensive joins.

Why should I use soft deletes with deleted_at timestamps in my data modeling?

You should use soft deletes with deleted_at timestamps in data modeling to preserve audit trails and allow data recovery. This approach maintains referential integrity while marking records as inactive rather than permanently erasing them.

Can I use cursor-based pagination to improve query performance over offset pagination?

Yes, you can use cursor-based pagination to improve query performance over offset pagination. It avoids scanning skipped rows, maintaining consistent speed on large datasets by anchoring subsequent queries to the last retrieved record.