What problem does it solve?
This Skill helps database architects and engineers design PostgreSQL schemas following industry best practices, reducing refactors by providing guidance on normalization, data types, constraints, and indexing.
Core Features & Use Cases
- Best-practice Schema Design: Normalize up to 3NF; know when to denormalize for read performance.
- Data Types & Constraints: Recommend appropriate data types, NOT NULL, DEFAULTs, and CHECK constraints.
- Indexing & Performance: Advise on indexing primary keys, foreign keys, and frequently queried columns; discuss MVCC considerations.
- Use Case: Design a schema for a user, product, and order system with proper FK relationships and scalable indexing.
Quick Start
Design a PostgreSQL schema for a simple e-commerce app with tables: users, products, orders, order_items, and reviews, including primary keys, foreign keys, appropriate NOT NULL constraints, and indexing on frequently queried columns (e.g., user_id, product_id, order_date).