databases

Design database schemas and write queries for PostgreSQL and MongoDB.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/IoT-VN/tuya-energy-dashboard --skill databases-iot-vn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databases
Source: https://github.com/IoT-VN/tuya-energy-dashboard/tree/main/.opencode/skills/databases
Command: npx skills add https://github.com/IoT-VN/tuya-energy-dashboard --skill databases-iot-vn

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill streamlines database operations by providing expert guidance on designing schemas, writing efficient queries, and optimizing database performance across both relational (PostgreSQL) and document (MongoDB) databases.

Core Features & Use Cases

  • Schema Design: Create optimal table structures for both transactional (OLTP) and analytical (OLAP) workloads.
  • Query Writing: Craft complex SQL queries, MongoDB aggregation pipelines, and perform CRUD operations.
  • Performance Tuning: Identify and resolve slow queries, optimize indexes, and improve database throughput.
  • Use Case: You need to design a new PostgreSQL database schema for an e-commerce platform, including tables for users, products, and orders, ensuring proper indexing and normalization.

Quick Start

Use the databases skill to design a PostgreSQL schema for an e-commerce platform.

Frequently Asked Questions about databases

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

FAQPage Schema
What is the best way to design a PostgreSQL schema for an e-commerce platform?

The best way to design a PostgreSQL schema is to create optimal table structures for transactional (OLTP) workloads, ensuring proper indexing and normalization for tables like users, products, and orders. This approach streamlines relational database operations.

How do I write a MongoDB aggregation pipeline for complex queries?

To write a MongoDB aggregation pipeline, you craft complex queries and perform CRUD operations using document database structures. This facilitates efficient data retrieval and transformation within NoSQL databases.

How do I optimize slow SQL queries and improve database throughput?

To optimize slow SQL queries, you identify and resolve performance bottlenecks by optimizing indexes and refining query structures. This performance tuning significantly improves overall database throughput.

Can I use this for both analytical and transactional database systems?

Yes, you can design schemas for both analytical (OLAP) and transactional (OLTP) systems. It provides comprehensive guidance on structuring databases to handle distinct workload requirements across relational and NoSQL environments.

How do I implement database migrations across PostgreSQL and MongoDB?

You implement database migrations by applying comprehensive schema design and query optimization guidance across both relational (PostgreSQL) and document (MongoDB) databases. This ensures structured and efficient database transitions.