databases

Design database schemas and SQL/MongoDB queries for OLTP and OLAP workloads.

1|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/hoanghd218/tranvanhoang.com --skill databases-hoanghd218
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databases
Source: https://github.com/hoanghd218/tranvanhoang.com/tree/main/.claude/skills/databases
Command: npx skills add https://github.com/hoanghd218/tranvanhoang.com --skill databases-hoanghd218

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pymongo, psycopg2, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Design robust database schemas and write efficient SQL and MongoDB queries.

Core Features & Use Cases

  • OLTP/OLAP data modeling guidance, including normalization, denormalization, and fact/dimension design.
  • Indexing, performance tuning, migrations, replication, and administration across MongoDB and PostgreSQL.
  • Real-world scenarios and best practices for schema design, query optimization, data governance, and cross-database interoperability.

Quick Start

Perform a quick schema review and apply standard indexing guidelines to your MongoDB and PostgreSQL designs.

Frequently Asked Questions about databases

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

FAQPage Schema
How do I design a database schema for both OLTP and OLAP workloads?

Database schema design for mixed workloads involves applying normalization for OLTP transactional integrity and denormalization with fact/dimension modeling for OLAP analytics. This approach structures data to satisfy specific query performance and reporting requirements.

What is the best way to optimize SQL queries and apply indexing strategies in PostgreSQL?

Optimizing SQL queries in PostgreSQL requires applying best-practice indexing strategies and performance tuning techniques. This involves structuring efficient queries and implementing standard indexing guidelines to improve database retrieval speeds.

How do I apply schema normalization and denormalization patterns in MongoDB?

Schema normalization and denormalization patterns in MongoDB balance data consistency and read performance. This guidance applies real-world schema design best practices to structure document data efficiently for specific application query patterns.

Does this database design approach support migrations and replication across PostgreSQL and MongoDB?

Yes, the approach supports database migrations, replication, and administration across both PostgreSQL and MongoDB. It provides cross-database interoperability guidance and data governance best practices for real-world data environments.

When should I use denormalization instead of normalization in my database schema design?

Use denormalization in database schema design when optimizing read-heavy analytical workloads requiring fast data retrieval, whereas normalization suits transactional OLTP systems needing data integrity. The choice depends on specific query performance and data governance requirements.