What problem does it solve?
This Skill provides a comprehensive reference for PostgreSQL schema design, covering data types, indexing strategies, constraints, performance patterns, and advanced features to prevent data anomalies and bottlenecks.
Core Features & Use Cases
- Guided schema design: best practices for table structures, primary/foreign keys, normalization vs denormalization decisions, and guidance for time-series or OLTP workloads.
- Data types & constraints: advice on selecting appropriate data types, not-null policies, CHECK constraints, and foreign key semantics to ensure data integrity.
- Performance patterns: indexing strategies, partitioning considerations, MVCC implications, and storage optimizations for scalable schemas.
- Use Case: design a transactional orders table with identity primary keys, proper foreign keys, and efficient query paths.
Quick Start
Define a small example schema with a customers table and an orders table, using appropriate data types, constraints, and indexes to demonstrate the recommended design choices.