[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78J4ZTC6ATB23JC41XSEPC4":3,"skill-same:01M78J4ZTC6ATB23JC41XSEPC4":107},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M78J4ZTC6ATB23JC41XSEPC4","database-designer",null,"Use when the user asks to design database schemas, plan data migrations, optimize queries, choose between SQL and NoSQL, or model data relationships.","aneeba-pixel\u002Fclaude-skills","aneeba-pixel","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F218186338?v=4","01M78GRXBTG70217SH410P543Y","Aneeba Saeed","01M78GRXCDZ6TA0F8H2CZMDGSS",0,"MIT","https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"database-designer\"\ndescription: \"Use when the user asks to design database schemas, plan data migrations, optimize queries, choose between SQL and NoSQL, or model data relationships.\"\n---\n\n# Database Designer - POWERFUL Tier Skill\n\n## Overview\n\nA comprehensive database design skill that provides expert-level analysis, optimization, and migration capabilities for modern database systems. This skill combines theoretical principles with practical tools to help architects and developers create scalable, performant, and maintainable database schemas.\n\n## Core Competencies\n\n### Schema Design & Analysis\n- **Normalization Analysis**: Automated detection of normalization levels (1NF through BCNF)\n- **Denormalization Strategy**: Smart recommendations for performance optimization\n- **Data Type Optimization**: Identification of inappropriate types and size issues\n- **Constraint Analysis**: Missing foreign keys, unique constraints, and null checks\n- **Naming Convention Validation**: Consistent table and column naming patterns\n- **ERD Generation**: Automatic Mermaid diagram creation from DDL\n\n### Index Optimization\n- **Index Gap Analysis**: Identification of missing indexes on foreign keys and query patterns\n- **Composite Index Strategy**: Optimal column ordering for multi-column indexes\n- **Index Redundancy Detection**: Elimination of overlapping and unused indexes\n- **Performance Impact Modeling**: Selectivity estimation and query cost analysis\n- **Index Type Selection**: B-tree, hash, partial, covering, and specialized indexes\n\n### Migration Management\n- **Zero-Downtime Migrations**: Expand-contract pattern implementation\n- **Schema Evolution**: Safe column additions, deletions, and type changes\n- **Data Migration Scripts**: Automated data transformation and validation\n- **Rollback Strategy**: Complete reversal capabilities with validation\n- **Execution Planning**: Ordered migration steps with dependency resolution\n\n## Database Design Principles\n→ See references\u002Fdatabase-design-reference.md for details\n\n## Best Practices\n\n### Schema Design\n1. **Use meaningful names**: Clear, consistent naming conventions\n2. **Choose appropriate data types**: Right-sized columns for storage efficiency\n3. **Define proper constraints**: Foreign keys, check constraints, unique indexes\n4. **Consider future growth**: Plan for scale from the beginning\n5. **Document relationships**: Clear foreign key relationships and business rules\n\n### Performance Optimization\n1. **Index strategically**: Cover common query patterns without over-indexing\n2. **Monitor query performance**: Regular analysis of slow queries\n3. **Partition large tables**: Improve query performance and maintenance\n4. **Use appropriate isolation levels**: Balance consistency with performance\n5. **Implement connection pooling**: Efficient resource utilization\n\n### Security Considerations\n1. **Principle of least privilege**: Grant minimal necessary permissions\n2. **Encrypt sensitive data**: At rest and in transit\n3. **Audit access patterns**: Monitor and log database access\n4. **Validate inputs**: Prevent SQL injection attacks\n5. **Regular security updates**: Keep database software current\n\n## Query Generation Patterns\n\n### SELECT with JOINs\n\n```sql\n-- INNER JOIN: only matching rows\nSELECT o.id, c.name, o.total\nFROM orders o\nINNER JOIN customers c ON c.id = o.customer_id;\n\n-- LEFT JOIN: all left rows, NULLs for non-matches\nSELECT c.name, COUNT(o.id) AS order_count\nFROM customers c\nLEFT JOIN orders o ON o.customer_id = c.id\nGROUP BY c.name;\n\n-- Self-join: hierarchical data (employees\u002Fmanagers)\nSELECT e.name AS employee, m.name AS manager\nFROM employees e\nLEFT JOIN employees m ON m.id = e.manager_id;\n```\n\n### Common Table Expressions (CTEs)\n\n```sql\n-- Recursive CTE for org chart\nWITH RECURSIVE org AS (\n  SELECT id, name, manager_id, 1 AS depth\n  FROM employees WHERE manager_id IS NULL\n  UNION ALL\n  SELECT e.id, e.name, e.manager_id, o.depth + 1\n  FROM employees e INNER JOIN org o ON o.id = e.manager_id\n)\nSELECT * FROM org ORDER BY depth, name;\n```\n\n### Window Functions\n\n```sql\n-- ROW_NUMBER for pagination \u002F dedup\nSELECT *, ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY created_at DESC) AS rn\nFROM orders;\n\n-- RANK with gaps, DENSE_RANK without gaps\nSELECT name, score, RANK() OVER (ORDER BY score DESC) AS rank FROM leaderboard;\n\n-- LAG\u002FLEAD for comparing adjacent rows\nSELECT date, revenue,\n  revenue - LAG(revenue) OVER (ORDER BY date) AS daily_change\nFROM daily_sales;\n```\n\n### Aggregation Patterns\n\n```sql\n-- FILTER clause (PostgreSQL) for conditional aggregation\nSELECT\n  COUNT(*) AS total,\n  COUNT(*) FILTER (WHERE status = 'active') AS active,\n  AVG(amount) FILTER (WHERE amount > 0) AS avg_positive\nFROM accounts;\n\n-- GROUPING SETS for multi-level rollups\nSELECT region, product, SUM(revenue)\nFROM sales\nGROUP BY GROUPING SETS ((region, product), (region), ());\n```\n\n---\n\n## Migration Patterns\n\n### Up\u002FDown Migration Scripts\n\nEvery migration must have a reversible counterpart. Name files with a timestamp prefix for ordering:\n\n```\nmigrations\u002F\n├── 20260101_000001_create_users.up.sql\n├── 20260101_000001_create_users.down.sql\n├── 20260115_000002_add_users_email_index.up.sql\n└── 20260115_000002_add_users_email_index.down.sql\n```\n\n### Zero-Downtime Migrations (Expand\u002FContract)\n\nUse the expand-contract pattern to avoid locking or breaking running code:\n\n1. **Expand** — add the new column\u002Ftable (nullable, with default)\n2. **Migrate data** — backfill in batches; dual-write from application\n3. **Transition** — application reads from new column; stop writing to old\n4. **Contract** — drop old column in a follow-up migration\n\n### Data Backfill Strategies\n\n```sql\n-- Batch update to avoid long-running locks\nUPDATE users SET email_normalized = LOWER(email)\nWHERE id IN (SELECT id FROM users WHERE email_normalized IS NULL LIMIT 5000);\n-- Repeat in a loop until 0 rows affected\n```\n\n### Rollback Procedures\n\n- Always test the `down.sql` in staging before deploying `up.sql` to production\n- Keep rollback window short — if the contract step has run, rollback requires a new forward migration\n- For irreversible changes (dropping columns with data), take a logical backup first\n\n---\n\n## Performance Optimization\n\n### Indexing Strategies\n\n| Index Type | Use Case | Example |\n|------------|----------|---------|\n| **B-tree** (default) | Equality, range, ORDER BY | `CREATE INDEX idx_users_email ON users(email);` |\n| **GIN** | Full-text search, JSONB, arrays | `CREATE INDEX idx_docs_body ON docs USING gin(to_tsvector('english', body));` |\n| **GiST** | Geometry, range types, nearest-neighbor | `CREATE INDEX idx_locations ON places USING gist(coords);` |\n| **Partial** | Subset of rows (reduce size) | `CREATE INDEX idx_active ON users(email) WHERE active = true;` |\n| **Covering** | Index-only scans | `CREATE INDEX idx_cov ON orders(customer_id) INCLUDE (total, created_at);` |\n\n### EXPLAIN Plan Reading\n\n```sql\nEXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT) SELECT ...;\n```\n\nKey signals to watch:\n- **Seq Scan** on large tables — missing index\n- **Nested Loop** with high row estimates — consider hash\u002Fmerge join or add index\n- **Buffers shared read** much higher than **hit** — working set exceeds memory\n\n### N+1 Query Detection\n\nSymptoms: application issues one query per row (e.g., fetching related records in a loop).\n\nFixes:\n- Use `JOIN` or subquery to fetch in one round-trip\n- ORM eager loading (`select_related` \u002F `includes` \u002F `with`)\n- DataLoader pattern for GraphQL resolvers\n\n### Connection Pooling\n\n| Tool | Protocol | Best For |\n|------|----------|----------|\n| **PgBouncer** | PostgreSQL | Transaction\u002Fstatement pooling, low overhead |\n| **ProxySQL** | MySQL | Query routing, read\u002Fwrite splitting |\n| **Built-in pool** (HikariCP, SQLAlchemy pool) | Any | Application-level pooling |\n\n**Rule of thumb:** Set pool size to `(2 * CPU cores) + disk spindles`. For cloud SSDs, start with `2 * vCPUs` and tune.\n\n### Read Replicas and Query Routing\n\n- Route all `SELECT` queries to replicas; writes to primary\n- Account for replication lag (typically \u003C1s for async, 0 for sync)\n- Use `pg_last_wal_replay_lsn()` to detect lag before reading critical data\n\n---\n\n## Multi-Database Decision Matrix\n\n| Criteria | PostgreSQL | MySQL | SQLite | SQL Server |\n|----------|-----------|-------|--------|------------|\n| **Best for** | Complex queries, JSONB, extensions | Web apps, read-heavy workloads | Embedded, dev\u002Ftest, edge | Enterprise .NET stacks |\n| **JSON support** | Excellent (JSONB + GIN) | Good (JSON type) | Minimal | Good (OPENJSON) |\n| **Replication** | Streaming, logical | Group replication, InnoDB cluster | N\u002FA | Always On AG |\n| **Licensing** | Open source (PostgreSQL License) | Open source (GPL) \u002F commercial | Public domain | Commercial |\n| **Max practical size** | Multi-TB | Multi-TB | ~1 TB (single-writer) | Multi-TB |\n\n**When to choose:**\n- **PostgreSQL** — default choice for new projects; best extensibility and standards compliance\n- **MySQL** — existing MySQL ecosystem; simple read-heavy web applications\n- **SQLite** — mobile apps, CLI tools, unit test databases, IoT\u002Fedge\n- **SQL Server** — mandated by enterprise policy; deep .NET\u002FAzure integration\n\n### NoSQL Considerations\n\n| Database | Model | Use When |\n|----------|-------|----------|\n| **MongoDB** | Document | Schema flexibility, rapid prototyping, content management |\n| **Redis** | Key-value \u002F cache | Session store, rate limiting, leaderboards, pub\u002Fsub |\n| **DynamoDB** | Wide-column | Serverless AWS apps, single-digit-ms latency at any scale |\n\n> Use SQL as default. Reach for NoSQL only when the access pattern clearly benefits from it.\n\n---\n\n## Sharding & Replication\n\n### Horizontal vs Vertical Partitioning\n\n- **Vertical partitioning**: Split columns across tables (e.g., separate BLOB columns). Reduces I\u002FO for narrow queries.\n- **Horizontal partitioning (sharding)**: Split rows across databases\u002Fservers. Required when a single node cannot hold the dataset or handle the throughput.\n\n### Sharding Strategies\n\n| Strategy | How It Works | Pros | Cons |\n|----------|-------------|------|------|\n| **Hash** | `shard = hash(key) % N` | Even distribution | Resharding is expensive |\n| **Range** | Shard by date or ID range | Simple, good for time-series | Hot spots on latest shard |\n| **Geographic** | Shard by user region | Data locality, compliance | Cross-region queries are hard |\n\n### Replication Patterns\n\n| Pattern | Consistency | Latency | Use Case |\n|---------|------------|---------|----------|\n| **Synchronous** | Strong | Higher write latency | Financial transactions |\n| **Asynchronous** | Eventual | Low write latency | Read-heavy web apps |\n| **Semi-synchronous** | At-least-one replica confirmed | Moderate | Balance of safety and speed |\n\n---\n\n## Cross-References\n\n- **sql-database-assistant** — query writing, optimization, and debugging for day-to-day SQL work\n- **database-schema-designer** — ERD modeling, normalization analysis, and schema generation\n- **migration-architect** — large-scale migration planning across database engines or major schema overhauls\n- **senior-backend** — application-layer patterns (connection pooling, ORM best practices)\n- **senior-devops** — infrastructure provisioning for database clusters and replicas\n\n---\n\n## Conclusion\n\nEffective database design requires balancing multiple competing concerns: performance, scalability, maintainability, and business requirements. This skill provides the tools and knowledge to make informed decisions throughout the database lifecycle, from initial schema design through production optimization and evolution.\n\nThe included tools automate common analysis and optimization tasks, while the comprehensive guides provide the theoretical foundation for making sound architectural decisions. Whether building a new system or optimizing an existing one, these resources provide expert-level guidance for creating robust, scalable database solutions.\n","# Database Designer - POWERFUL Tier Skill\n\n## Overview\n\nA comprehensive database design skill that provides expert-level analysis, optimization, and migration capabilities for modern database systems. This skill combines theoretical principles with practical tools to help architects and developers create scalable, performant, and maintainable database schemas.\n\n## Core Competencies\n\n### Schema Design & Analysis\n- **Normalization Analysis**: Automated detection of normalization levels (1NF through BCNF)\n- **Denormalization Strategy**: Smart recommendations for performance optimization\n- **Data Type Optimization**: Identification of inappropriate types and size issues\n- **Constraint Analysis**: Missing foreign keys, unique constraints, and null checks\n- **Naming Convention Validation**: Consistent table and column naming patterns\n- **ERD Generation**: Automatic Mermaid diagram creation from DDL\n\n### Index Optimization\n- **Index Gap Analysis**: Identification of missing indexes on foreign keys and query patterns\n- **Composite Index Strategy**: Optimal column ordering for multi-column indexes\n- **Index Redundancy Detection**: Elimination of overlapping and unused indexes\n- **Performance Impact Modeling**: Selectivity estimation and query cost analysis\n- **Index Type Selection**: B-tree, hash, partial, covering, and specialized indexes\n\n### Migration Management\n- **Zero-Downtime Migrations**: Expand-contract pattern implementation\n- **Schema Evolution**: Safe column additions, deletions, and type changes\n- **Data Migration Scripts**: Automated data transformation and validation\n- **Rollback Strategy**: Complete reversal capabilities with validation\n- **Execution Planning**: Ordered migration steps with dependency resolution\n\n## Database Design Principles\n→ See references\u002Fdatabase-design-reference.md for details\n\n## Best Practices\n\n### Schema Design\n1. **Use meaningful names**: Clear, consistent naming conventions\n2. **Choose appropriate data types**: Right-sized columns for storage efficiency\n3. **Define proper constraints**: Foreign keys, check constraints, unique indexes\n4. **Consider future growth**: Plan for scale from the beginning\n5. **Document relationships**: Clear foreign key relationships and business rules\n\n### Performance Optimization\n1. **Index strategically**: Cover common query patterns without over-indexing\n2. **Monitor query performance**: Regular analysis of slow queries\n3. **Partition large tables**: Improve query performance and maintenance\n4. **Use appropriate isolation levels**: Balance consistency with performance\n5. **Implement connection pooling**: Efficient resource utilization\n\n### Security Considerations\n1. **Principle of least privilege**: Grant minimal necessary permissions\n2. **Encrypt sensitive data**: At rest and in transit\n3. **Audit access patterns**: Monitor and log database access\n4. **Validate inputs**: Prevent SQL injection attacks\n5. **Regular security updates**: Keep database software current\n\n## Query Generation Patterns\n\n### SELECT with JOINs\n\n```sql\n-- INNER JOIN: only matching rows\nSELECT o.id, c.name, o.total\nFROM orders o\nINNER JOIN customers c ON c.id = o.customer_id;\n\n-- LEFT JOIN: all left rows, NULLs for non-matches\nSELECT c.name, COUNT(o.id) AS order_count\nFROM customers c\nLEFT JOIN orders o ON o.customer_id = c.id\nGROUP BY c.name;\n\n-- Self-join: hierarchical data (employees\u002Fmanagers)\nSELECT e.name AS employee, m.name AS manager\nFROM employees e\nLEFT JOIN employees m ON m.id = e.manager_id;\n```\n\n### Common Table Expressions (CTEs)\n\n```sql\n-- Recursive CTE for org chart\nWITH RECURSIVE org AS (\n  SELECT id, name, manager_id, 1 AS depth\n  FROM employees WHERE manager_id IS NULL\n  UNION ALL\n  SELECT e.id, e.name, e.manager_id, o.depth + 1\n  FROM employees e INNER JOIN org o ON o.id = e.manager_id\n)\nSELECT * FROM org ORDER BY depth, name;\n```\n\n### Window Functions\n\n```sql\n-- ROW_NUMBER for pagination \u002F dedup\nSELECT *, ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY created_at DESC) AS rn\nFROM orders;\n\n-- RANK with gaps, DENSE_RANK without gaps\nSELECT name, score, RANK() OVER (ORDER BY score DESC) AS rank FROM leaderboard;\n\n-- LAG\u002FLEAD for comparing adjacent rows\nSELECT date, revenue,\n  revenue - LAG(revenue) OVER (ORDER BY date) AS daily_change\nFROM daily_sales;\n```\n\n### Aggregation Patterns\n\n```sql\n-- FILTER clause (PostgreSQL) for conditional aggregation\nSELECT\n  COUNT(*) AS total,\n  COUNT(*) FILTER (WHERE status = 'active') AS active,\n  AVG(amount) FILTER (WHERE amount > 0) AS avg_positive\nFROM accounts;\n\n-- GROUPING SETS for multi-level rollups\nSELECT region, product, SUM(revenue)\nFROM sales\nGROUP BY GROUPING SETS ((region, product), (region), ());\n```\n\n---\n\n## Migration Patterns\n\n### Up\u002FDown Migration Scripts\n\nEvery migration must have a reversible counterpart. Name files with a timestamp prefix for ordering:\n\n```\nmigrations\u002F\n├── 20260101_000001_create_users.up.sql\n├── 20260101_000001_create_users.down.sql\n├── 20260115_000002_add_users_email_index.up.sql\n└── 20260115_000002_add_users_email_index.down.sql\n```\n\n### Zero-Downtime Migrations (Expand\u002FContract)\n\nUse the expand-contract pattern to avoid locking or breaking running code:\n\n1. **Expand** — add the new column\u002Ftable (nullable, with default)\n2. **Migrate data** — backfill in batches; dual-write from application\n3. **Transition** — application reads from new column; stop writing to old\n4. **Contract** — drop old column in a follow-up migration\n\n### Data Backfill Strategies\n\n```sql\n-- Batch update to avoid long-running locks\nUPDATE users SET email_normalized = LOWER(email)\nWHERE id IN (SELECT id FROM users WHERE email_normalized IS NULL LIMIT 5000);\n-- Repeat in a loop until 0 rows affected\n```\n\n### Rollback Procedures\n\n- Always test the `down.sql` in staging before deploying `up.sql` to production\n- Keep rollback window short — if the contract step has run, rollback requires a new forward migration\n- For irreversible changes (dropping columns with data), take a logical backup first\n\n---\n\n## Performance Optimization\n\n### Indexing Strategies\n\n| Index Type | Use Case | Example |\n|------------|----------|---------|\n| **B-tree** (default) | Equality, range, ORDER BY | `CREATE INDEX idx_users_email ON users(email);` |\n| **GIN** | Full-text search, JSONB, arrays | `CREATE INDEX idx_docs_body ON docs USING gin(to_tsvector('english', body));` |\n| **GiST** | Geometry, range types, nearest-neighbor | `CREATE INDEX idx_locations ON places USING gist(coords);` |\n| **Partial** | Subset of rows (reduce size) | `CREATE INDEX idx_active ON users(email) WHERE active = true;` |\n| **Covering** | Index-only scans | `CREATE INDEX idx_cov ON orders(customer_id) INCLUDE (total, created_at);` |\n\n### EXPLAIN Plan Reading\n\n```sql\nEXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT) SELECT ...;\n```\n\nKey signals to watch:\n- **Seq Scan** on large tables — missing index\n- **Nested Loop** with high row estimates — consider hash\u002Fmerge join or add index\n- **Buffers shared read** much higher than **hit** — working set exceeds memory\n\n### N+1 Query Detection\n\nSymptoms: application issues one query per row (e.g., fetching related records in a loop).\n\nFixes:\n- Use `JOIN` or subquery to fetch in one round-trip\n- ORM eager loading (`select_related` \u002F `includes` \u002F `with`)\n- DataLoader pattern for GraphQL resolvers\n\n### Connection Pooling\n\n| Tool | Protocol | Best For |\n|------|----------|----------|\n| **PgBouncer** | PostgreSQL | Transaction\u002Fstatement pooling, low overhead |\n| **ProxySQL** | MySQL | Query routing, read\u002Fwrite splitting |\n| **Built-in pool** (HikariCP, SQLAlchemy pool) | Any | Application-level pooling |\n\n**Rule of thumb:** Set pool size to `(2 * CPU cores) + disk spindles`. For cloud SSDs, start with `2 * vCPUs` and tune.\n\n### Read Replicas and Query Routing\n\n- Route all `SELECT` queries to replicas; writes to primary\n- Account for replication lag (typically \u003C1s for async, 0 for sync)\n- Use `pg_last_wal_replay_lsn()` to detect lag before reading critical data\n\n---\n\n## Multi-Database Decision Matrix\n\n| Criteria | PostgreSQL | MySQL | SQLite | SQL Server |\n|----------|-----------|-------|--------|------------|\n| **Best for** | Complex queries, JSONB, extensions | Web apps, read-heavy workloads | Embedded, dev\u002Ftest, edge | Enterprise .NET stacks |\n| **JSON support** | Excellent (JSONB + GIN) | Good (JSON type) | Minimal | Good (OPENJSON) |\n| **Replication** | Streaming, logical | Group replication, InnoDB cluster | N\u002FA | Always On AG |\n| **Licensing** | Open source (PostgreSQL License) | Open source (GPL) \u002F commercial | Public domain | Commercial |\n| **Max practical size** | Multi-TB | Multi-TB | ~1 TB (single-writer) | Multi-TB |\n\n**When to choose:**\n- **PostgreSQL** — default choice for new projects; best extensibility and standards compliance\n- **MySQL** — existing MySQL ecosystem; simple read-heavy web applications\n- **SQLite** — mobile apps, CLI tools, unit test databases, IoT\u002Fedge\n- **SQL Server** — mandated by enterprise policy; deep .NET\u002FAzure integration\n\n### NoSQL Considerations\n\n| Database | Model | Use When |\n|----------|-------|----------|\n| **MongoDB** | Document | Schema flexibility, rapid prototyping, content management |\n| **Redis** | Key-value \u002F cache | Session store, rate limiting, leaderboards, pub\u002Fsub |\n| **DynamoDB** | Wide-column | Serverless AWS apps, single-digit-ms latency at any scale |\n\n> Use SQL as default. Reach for NoSQL only when the access pattern clearly benefits from it.\n\n---\n\n## Sharding & Replication\n\n### Horizontal vs Vertical Partitioning\n\n- **Vertical partitioning**: Split columns across tables (e.g., separate BLOB columns). Reduces I\u002FO for narrow queries.\n- **Horizontal partitioning (sharding)**: Split rows across databases\u002Fservers. Required when a single node cannot hold the dataset or handle the throughput.\n\n### Sharding Strategies\n\n| Strategy | How It Works | Pros | Cons |\n|----------|-------------|------|------|\n| **Hash** | `shard = hash(key) % N` | Even distribution | Resharding is expensive |\n| **Range** | Shard by date or ID range | Simple, good for time-series | Hot spots on latest shard |\n| **Geographic** | Shard by user region | Data locality, compliance | Cross-region queries are hard |\n\n### Replication Patterns\n\n| Pattern | Consistency | Latency | Use Case |\n|---------|------------|---------|----------|\n| **Synchronous** | Strong | Higher write latency | Financial transactions |\n| **Asynchronous** | Eventual | Low write latency | Read-heavy web apps |\n| **Semi-synchronous** | At-least-one replica confirmed | Moderate | Balance of safety and speed |\n\n---\n\n## Cross-References\n\n- **sql-database-assistant** — query writing, optimization, and debugging for day-to-day SQL work\n- **database-schema-designer** — ERD modeling, normalization analysis, and schema generation\n- **migration-architect** — large-scale migration planning across database engines or major schema overhauls\n- **senior-backend** — application-layer patterns (connection pooling, ORM best practices)\n- **senior-devops** — infrastructure provisioning for database clusters and replicas\n\n---\n\n## Conclusion\n\nEffective database design requires balancing multiple competing concerns: performance, scalability, maintainability, and business requirements. This skill provides the tools and knowledge to make informed decisions throughout the database lifecycle, from initial schema design through production optimization and evolution.\n\nThe included tools automate common analysis and optimization tasks, while the comprehensive guides provide the theoretical foundation for making sound architectural decisions. Whether building a new system or optimizing an existing one, these resources provide expert-level guidance for creating robust, scalable database solutions.\n",{"name":5,"description":7},"claude\u002Fopen-prs-review-Of9HK","a48d8438efe8e36550acc4c2006bdcddf62911db","engineering\u002Fskills\u002Fdatabase-designer","https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills","https:\u002F\u002Fgithub.com\u002Faneeba-pixel","Student at University of Gujrat","2026-07-14 21:41:17",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add aneeba-pixel\u002Fclaude-skills --skill database-designer",{"tool":37,"command":38},"bunx","bunx skills add aneeba-pixel\u002Fclaude-skills --skill database-designer",{"tool":40,"command":41},"pnpm","pnpm dlx skills add aneeba-pixel\u002Fclaude-skills --skill database-designer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002FSKILL.md",true,[45,51,55,59,65,69,73,79,83,87,91,95,99,103],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"assets\u002Fsample_query_patterns.json","ASSET","资产文件",9244,"https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002Fassets\u002Fsample_query_patterns.json",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"assets\u002Fsample_schema.json",9365,"https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002Fassets\u002Fsample_schema.json",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"assets\u002Fsample_schema.sql",8301,"https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002Fassets\u002Fsample_schema.sql",{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"expected_outputs\u002Findex_optimization_sample.txt","REFERENCE","参考文档",2639,"https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002Fexpected_outputs\u002Findex_optimization_sample.txt",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":67,"sourceHtmlUrl":68},"expected_outputs\u002Fmigration_sample.txt",4509,"https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002Fexpected_outputs\u002Fmigration_sample.txt",{"path":70,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":71,"sourceHtmlUrl":72},"expected_outputs\u002Fschema_analysis_sample.txt",7474,"https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002Fexpected_outputs\u002Fschema_analysis_sample.txt",{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"index_optimizer.py","SCRIPT","脚本",38896,"https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002Findex_optimizer.py",{"path":80,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":81,"sourceHtmlUrl":82},"migration_generator.py",50373,"https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002Fmigration_generator.py",{"path":84,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":85,"sourceHtmlUrl":86},"README.md",11966,"https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002FREADME.md",{"path":88,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fdatabase_selection_decision_tree.md",16344,"https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002Freferences\u002Fdatabase_selection_decision_tree.md",{"path":92,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fdatabase-design-reference.md",14014,"https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002Freferences\u002Fdatabase-design-reference.md",{"path":96,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Findex_strategy_patterns.md",11831,"https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002Freferences\u002Findex_strategy_patterns.md",{"path":100,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Fnormalization_guide.md",10672,"https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002Freferences\u002Fnormalization_guide.md",{"path":104,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":105,"sourceHtmlUrl":106},"schema_analyzer.py",42034,"https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fengineering\u002Fskills\u002Fdatabase-designer\u002Fschema_analyzer.py",[108,115,122,129,136,143],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M78K120A3JKH3NH8GC19YG4M","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Triggers whenever a user uploads a syllabus, course outline, or curriculum document and wants supplementary readings. Also triggers on: 'syllabus reading list', 'find papers for my course', 'create a reading list from this syllabus', 'recent research for my class', 'supplementary readings', 'find journal articles for these topics', 'what recent papers cover this material', 'any new research on these course topics', 'update my syllabus with recent papers'. Even casual mentions when a syllabus is attached should trigger this skill.","https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":19},"01M78K0QS9AGDJ43CPQYEHM5S0","research","Default entry point for any research request — a hybrid router that classifies the question deterministically and either delegates to a specialist research skill (pulse for trends\u002Fsentiment, grants for NIH funding, litreview for academic literature, syllabus for course reading, patent for prior-art + IP landscape, dossier for entity research) or runs its own plan-decompose-multi-source-search-synthesize-cite fallback workflow when no specialist matches. Always surfaces the routing decision so users can override. Triggers — \"research [topic]\", \"look into [topic]\", \"what do we know about [topic]\", \"investigate [topic]\", \"find me information on [topic]\", \"do some research on [topic]\", \"I need to understand [topic]\", or any research request that doesn't obviously match a more-specific specialist skill. Output is a markdown briefing (default) or .docx document (on request) with full citations and an audit log.","https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fresearch\u002Fresearch\u002Fskills\u002Fresearch\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":19},"01M78K0FV3HMJ94SK965CWMNNP","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Triggers: 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]', or any variation requesting multi-source recency intelligence on a topic. Also use for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":19},"01M78K04E77B04KYBB6M01EV3J","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Triggers: 'prior art search for [invention]', 'patent search on [topic]', 'freedom to operate analysis', 'FTO for [product]', 'patent landscape for [field]', 'is [invention] novel', 'patents on [topic]', 'competitive patent analysis', 'prior art for litigation', 'patent diligence on [company]'. Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":19},"01M78JZW8XEFZP6HSF53M8D4M1","notebooklm","Browser automation skill for controlling Google's NotebookLM. Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio Overview, infographics, slide decks, study guides, briefing docs, mind maps, timelines, FAQs), and creating new notebooks. Triggers on any phrase involving NotebookLM — 'open NotebookLM', 'check my [name] notebook', 'pull info from NotebookLM', 'ask my notebook about X', 'add [source] to NotebookLM', 'create an infographic in NotebookLM', 'use NotebookLM Studio', 'generate a slide deck from my notebook', or any variation where the goal involves NotebookLM. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":19},"01M78JZHX45S2Y0GPY9Z5V6TQ3","litreview","Academic literature orientation skill that searches papers via Consensus, builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a professionally formatted Word document (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — not a finished review, but an orientation guide that lets a researcher dive in confidently. Triggers: 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'. Do NOT trigger for single one-off paper searches where the user just wants a quick list — that's a plain Consensus search.","https:\u002F\u002Fgithub.com\u002Faneeba-pixel\u002Fclaude-skills\u002Fblob\u002Fclaude\u002Fopen-prs-review-Of9HK\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[]]