databases

Provides guidance for designing schemas and writing queries in PostgreSQL and MongoDB.

Updated Jan 27, 2026
One-click install
npx skills add https://github.com/Hoang130203/Emgu_CV_automation --skill databases-hoang130203
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databases
Source: https://github.com/Hoang130203/Emgu_CV_automation/tree/main/.opencode/skills/databases
Command: npx skills add https://github.com/Hoang130203/Emgu_CV_automation --skill databases-hoang130203

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines database management by providing unified guidance for designing schemas and writing queries across both MongoDB and PostgreSQL.

Core Features & Use Cases

  • Schema Design: Create optimal schemas for transactional (OLTP) and analytical (OLAP) workloads.
  • Query Writing: Write efficient SQL and MongoDB queries, aggregation pipelines, and use psql CLI commands.
  • Use Case: Design a relational schema for an e-commerce order system in PostgreSQL and then create an aggregation pipeline in MongoDB to analyze sales trends by product category.

Quick Start

Use the databases skill to design a PostgreSQL table for storing user data.

Frequently Asked Questions about databases

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

FAQPage Schema
How do I design an optimal database schema for OLTP and OLAP workloads?

This Skill provides unified guidance to design database schemas optimized for transactional (OLTP) and analytical (OLAP) workloads. It helps you structure relational tables in PostgreSQL and document models in MongoDB to support both operational efficiency and analytical aggregation.

How do I write a MongoDB aggregation pipeline to analyze sales trends?

To analyze sales trends, you write a MongoDB aggregation pipeline to group and process document data by product category. This Skill provides comprehensive guidance on building efficient MongoDB aggregation pipelines to extract analytical insights from your NoSQL data.

What is the best way to manage PostgreSQL queries using the psql CLI?

The best way to manage PostgreSQL queries via the psql CLI is to utilize its built-in commands for executing SQL, inspecting schemas, and profiling performance. This Skill covers writing efficient SQL queries and using psql CLI commands for comprehensive database management.

Does this database Skill support both SQL and NoSQL query optimization?

Yes, this Skill supports both SQL and NoSQL query optimization. It provides comprehensive guidance on writing efficient SQL queries for PostgreSQL and NoSQL queries for MongoDB, including indexing and performance optimization techniques for both relational and document database systems.

How do I handle database migrations and replication in PostgreSQL?

To handle database migrations and replication in PostgreSQL, you apply schema evolution techniques and configure data synchronization across nodes. This Skill covers database migrations, replication strategies, and performance optimization using tools like the psql CLI.