databases

Guide MongoDB and PostgreSQL schema design, indexing, queries, and migrations.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/luan-thnh/hrm-auto-extension --skill databases-luan-thnh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databases
Source: https://github.com/luan-thnh/hrm-auto-extension/tree/main/.opencode/skills/databases
Command: npx skills add https://github.com/luan-thnh/hrm-auto-extension --skill databases-luan-thnh

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Unified guidance for designing, querying, and administering MongoDB and PostgreSQL, helping teams choose the right model and apply best practices across both systems.

Core Features & Use Cases

  • Database design guidance for MongoDB (document model) and PostgreSQL (relational model), including schema patterns and trade-offs.
  • SQL and NoSQL querying patterns, including aggregation, joins, and indexing strategies.
  • Migration, backup, replication, and performance optimization practices for production deployments in multi-database environments.
  • Practical workflows for production administration, security, and monitoring across both databases.

Quick Start

Begin by reading this unified guide to design schemas, write efficient queries, and plan migrations for your multi-database app.

Frequently Asked Questions about databases

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

FAQPage Schema
How do I design schemas and apply indexing strategies for both MongoDB and PostgreSQL?

Schema design and indexing strategies for MongoDB and PostgreSQL are provided through structured guidance, covering document model patterns, relational trade-offs, and indexing best practices to optimize queries across both database systems.

What's the best way to plan database migrations and backups for a multi-database production environment?

Database migration and backup planning for multi-database production environments is covered with practical workflows, offering structured steps for administering replication, security, and monitoring across both PostgreSQL and MongoDB.

When should I choose a NoSQL document model over a relational model for my application?

Choosing a NoSQL document model over a relational model depends on your data structure, and unified guidance explains these schema design trade-offs to help you select the right PostgreSQL or MongoDB approach for your application.

How do I write efficient SQL and NoSQL queries including aggregations and joins?

Efficient SQL and NoSQL queries, including aggregations and joins, are explained through practical examples and querying patterns that demonstrate how to retrieve and process data effectively across both database systems.

Can I use pymongo and psycopg2 to implement the database administration workflows in this guide?

Yes, pymongo and psycopg2 are the required dependencies for implementing the practical database administration workflows, enabling hands-on execution of querying, indexing, and migration tasks across MongoDB and PostgreSQL.

How do I optimize database performance and plan replication for production deployments?

Database performance optimization and replication planning for production deployments are supported with best-practice references and practical workflows to ensure system reliability and scalability across multi-database environments.