moai-domain-database

Design schemas, optimize queries, and configure PostgreSQL, MongoDB, Redis, Oracle, and cloud databases.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/taewook486/Masters_degree --skill moai-domain-database-taewook486
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: moai-domain-database
Source: https://github.com/taewook486/Masters_degree/tree/main/.claude/skills/moai-domain-database
Command: npx skills add https://github.com/taewook486/Masters_degree --skill moai-domain-database-taewook486

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing the right database architecture and writing efficient schemas, indexes, and queries across relational, document, in-memory, and cloud databases is error-prone and time-consuming. This Skill provides structured guidance for schema design, query optimization, indexing strategies, and cloud database selection so you avoid common production failures like missing indexes, unreproducible schema changes, and misconfigured connection pools. ## Core Features & Use Cases - Multi-Database Expertise: Covers PostgreSQL, MongoDB, Redis, and Oracle with patterns for schema design, aggregation pipelines, caching, PL/SQL, partitioning, and polyglot persistence architectures. - Cloud Database Selection: Decision guide for Neon (serverless PostgreSQL with branching), Supabase (pgvector, Row-Level Security, real-time), and Firebase Firestore (offline sync, Security Rules). - Performance & Operations: Query analysis with EXPLAIN ANALYZE, scaling strategies (read replicas, sharding, clustering), migration discipline, and verification checklists with red-flag detection. - Use Case: When building a multi-tenant SaaS app, use this Skill to choose Supabase for Row-Level Security, design the schema with proper indexes, write reversible migrations, and configure connection pooling for production load. ## Quick Start Ask the assistant to design a PostgreSQL schema with indexes and a migration plan for your application's data model.

Frequently Asked Questions about moai-domain-database

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

FAQPage Schema
How do I optimize a slow PostgreSQL query?▼

Run EXPLAIN ANALYZE BUFFERS on the query to inspect the execution plan, then check that indexes exist for columns used in WHERE, JOIN, and ORDER BY clauses. Add missing indexes and verify the new plan on representative production-scale data.

Should I use Neon, Supabase, or Firestore for my app?▼

Choose Neon for serverless PostgreSQL with auto-scaling and database branching, Supabase for pgvector search, Row-Level Security, and real-time subscriptions, or Firestore for mobile-first apps needing offline sync and cross-platform SDKs.

Does MongoDB schema design matter if it is schemaless?▼

Yes. Schemaless does not mean designless. Document structure decisions affect every query and index, so model documents around access patterns and define validation rules before writing data.

Why do schema changes break production without migrations?▼

Schema changes without migration scripts are unreproducible across environments. Adding a NOT NULL column without a default breaks existing inserts, so every change needs a reversible migration with defaults or backfills.

How do I set up Row-Level Security in Supabase?▼

Create a policy such as CREATE POLICY "users_own_data" ON items FOR ALL USING (auth.uid() = user_id). This restricts rows to the authenticated user and is the standard pattern for multi-tenant applications.

When should I use Redis versus PostgreSQL for caching?▼

Use Redis for real-time data, session state, distributed locks, and multi-layer caching with TTLs, while PostgreSQL remains the source of truth for structured relational data. A polyglot pattern routes each data type to the appropriate store.