PostgreSQL Schema Design

•
14
•

Standardizes PostgreSQL database schema design using production-grade best practices for indexing, data types, and performance optimization.

This skill provides Claude with expert-level guidance for designing, reviewing, and optimizing PostgreSQL database schemas. It enforces critical industry standards such as normalization to 3NF, proper use of TIMESTAMPTZ and BIGINT IDENTITY, and strategic indexing of foreign keys and query paths. It helps developers avoid common PostgreSQL pitfalls like silent identifier lowercasing or inefficient storage choices while offering advanced patterns for Row-Level Security (RLS), table partitioning, and JSONB implementation. Whether building a new application or refactoring for scale, this skill ensures your database layer is robust, performant, and maintainable.

主要功能

01Strict enforcement of data integrity through constraints (Check, Unique, Foreign Key).
02Expert data type selection including TIMESTAMPTZ, NUMERIC for currency, and BIGINT identity columns.
03Comprehensive indexing strategies covering B-tree, GIN, GiST, BRIN, and covering indexes.
0414 GitHub stars
05Advanced performance patterns for table partitioning, RLS policies, and MVCC optimization.
06Safety-first migration protocols to prevent destructive DDL changes in production.

使用场景

01Designing high-performance relational schemas for scalable web applications.
02Refactoring legacy database tables to improve query speed and eliminate data redundancy.
03Implementing vector similarity search for AI applications using pgvector types.