database
Installation
SKILL.md
Database Development
PostgreSQL
- Normalized schema (3NF minimum)
- UUID primary keys for distributed systems
- Created_at/updated_at timestamps on all tables
- Foreign key constraints with ON DELETE behavior
- Check constraints for data integrity
Indexing
- B-tree for equality and range queries
- GIN for full-text search and JSONB
- Partial indexes for filtered queries
- Composite indexes: most selective column first
- EXPLAIN ANALYZE before and after