{"id":"9b0218c6-0e59-4ab8-a508-712352f20e5c","entityType":"agent","slug":"clawhub-skills-alirezarezvani-database-designer","name":"database-designer","canonicalUrl":"https://www.xpersona.co/agent/clawhub-skills-alirezarezvani-database-designer","canonicalPath":"/agent/clawhub-skills-alirezarezvani-database-designer","generatedAt":"2026-10-09T10:46:24.686Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"description":"Database Designer - POWERFUL Tier Skill Database Designer - POWERFUL Tier Skill Overview A 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. Core Competencies Schema Design & Analysis - **Normalization Ana","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. Last updated 4/15/2026.","installCommand":"clawhub skill install skills:alirezarezvani:database-designer","sourceUrl":"https://github.com/openclaw/skills/tree/main/skills/alirezarezvani/database-designer","homepage":null,"primaryLinks":[{"label":"View on ClawHub","url":"https://github.com/openclaw/skills/tree/main/skills/alirezarezvani/database-designer","kind":"source"}],"safetyScore":84,"overallRank":62,"popularityScore":50,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Database Designer - POWERFUL Tier Skill Database Designer - POWERFUL Tier Skill Overview A comprehensive database design skill that provides expert-level analys"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[{"label":"be","status":"self-declared"},{"label":"leading","status":"self-declared"},{"label":"range","status":"self-declared"}],"verifiedCount":0,"selfDeclaredCount":4,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"},{"key":"be","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"},{"key":"leading","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"},{"key":"range","type":"capability","support":"supported","confidenceSource":"profile","notes":"Declared in agent profile metadata"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile capability:be|supported|profile capability:leading|supported|profile capability:range|supported|profile"}},"adoption":{"evidence":{"source":"no-adoption-signals","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"No source adoption metrics were available."},"stars":null,"forks":null,"downloads":null,"packageName":null,"latestVersion":null,"tractionLabel":null},"release":{"evidence":{"source":"agent-index","verified":false,"confidence":"medium","updatedAt":"2026-02-25T05:59:19.765Z","emptyReason":null},"lastUpdatedAt":"2026-04-15T00:45:39.800Z","lastCrawledAt":"2026-02-25T05:59:19.765Z","lastIndexedAt":null,"nextCrawlAt":"2026-02-26T05:59:19.765Z","lastVerifiedAt":null,"highlights":[]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install skills:alirezarezvani:database-designer","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-skills-alirezarezvani-database-designer/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-skills-alirezarezvani-database-designer/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-skills-alirezarezvani-database-designer/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-skills-alirezarezvani-database-designer/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-skills-alirezarezvani-database-designer/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-skills-alirezarezvani-database-designer/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T10:46:24.686Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-skills-alirezarezvani-database-designer/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-skills-alirezarezvani-database-designer/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-skills-alirezarezvani-database-designer/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-skills-alirezarezvani-database-designer/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"readme":"# 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\n### Normalization Forms\n\n#### First Normal Form (1NF)\n- **Atomic Values**: Each column contains indivisible values\n- **Unique Column Names**: No duplicate column names within a table\n- **Uniform Data Types**: Each column contains the same type of data\n- **Row Uniqueness**: No duplicate rows in the table\n\n**Example Violation:**\n```sql\n-- BAD: Multiple phone numbers in one column\nCREATE TABLE contacts (\n    id INT PRIMARY KEY,\n    name VARCHAR(100),\n    phones VARCHAR(200)  -- \"123-456-7890, 098-765-4321\"\n);\n\n-- GOOD: Separate table for phone numbers\nCREATE TABLE contacts (\n    id INT PRIMARY KEY,\n    name VARCHAR(100)\n);\n\nCREATE TABLE contact_phones (\n    id INT PRIMARY KEY,\n    contact_id INT REFERENCES contacts(id),\n    phone_number VARCHAR(20),\n    phone_type VARCHAR(10)\n);\n```\n\n#### Second Normal Form (2NF)\n- **1NF Compliance**: Must satisfy First Normal Form\n- **Full Functional Dependency**: Non-key attributes depend on the entire primary key\n- **Partial Dependency Elimination**: Remove attributes that depend on part of a composite key\n\n**Example Violation:**\n```sql\n-- BAD: Student course table with partial dependencies\nCREATE TABLE student_courses (\n    student_id INT,\n    course_id INT,\n    student_name VARCHAR(100),  -- Depends only on student_id\n    course_name VARCHAR(100),   -- Depends only on course_id\n    grade CHAR(1),\n    PRIMARY KEY (student_id, course_id)\n);\n\n-- GOOD: Separate tables eliminate partial dependencies\nCREATE TABLE students (\n    id INT PRIMARY KEY,\n    name VARCHAR(100)\n);\n\nCREATE TABLE courses (\n    id INT PRIMARY KEY,\n    name VARCHAR(100)\n);\n\nCREATE TABLE enrollments (\n    student_id INT REFERENCES students(id),\n    course_id INT REFERENCES courses(id),\n    grade CHAR(1),\n    PRIMARY KEY (student_id, course_id)\n);\n```\n\n#### Third Normal Form (3NF)\n- **2NF Compliance**: Must satisfy Second Normal Form\n- **Transitive Dependency Elimination**: Non-key attributes should not depend on other non-key attributes\n- **Direct Dependency**: Non-key attributes depend directly on the primary key\n\n**Example Violation:**\n```sql\n-- BAD: Employee table with transitive dependency\nCREATE TABLE employees (\n    id INT PRIMARY KEY,\n    name VARCHAR(100),\n    department_id INT,\n    department_name VARCHAR(100),  -- Depends on department_id, not employee id\n    department_budget DECIMAL(10,2) -- Transitive dependency\n);\n\n-- GOOD: Separate department information\nCREATE TABLE departments (\n    id INT PRIMARY KEY,\n    name VARCHAR(100),\n    budget DECIMAL(10,2)\n);\n\nCREATE TABLE employees (\n    id INT PRIMARY KEY,\n    name VARCHAR(100),\n    department_id INT REFERENCES departments(id)\n);\n```\n\n#### Boyce-Codd Normal Form (BCNF)\n- **3NF Compliance**: Must satisfy Third Normal Form\n- **Determinant Key Rule**: Every determinant must be a candidate key\n- **Stricter 3NF**: Handles anomalies not covered by 3NF\n\n### Denormalization Strategies\n\n#### When to Denormalize\n1. **Read-Heavy Workloads**: High query frequency with acceptable write trade-offs\n2. **Performance Bottlenecks**: Join operations causing significant latency\n3. **Aggregation Needs**: Frequent calculation of derived values\n4. **Caching Requirements**: Pre-computed results for common queries\n\n#### Common Denormalization Patterns\n\n**Redundant Storage**\n```sql\n-- Store calculated values to avoid expensive joins\nCREATE TABLE orders (\n    id INT PRIMARY KEY,\n    customer_id INT REFERENCES customers(id),\n    customer_name VARCHAR(100), -- Denormalized from customers table\n    order_total DECIMAL(10,2),  -- Denormalized calculation\n    created_at TIMESTAMP\n);\n```\n\n**Materialized Aggregates**\n```sql\n-- Pre-computed summary tables\nCREATE TABLE customer_statistics (\n    customer_id INT PRIMARY KEY,\n    total_orders INT,\n    lifetime_value DECIMAL(12,2),\n    last_order_date DATE,\n    updated_at TIMESTAMP\n);\n```\n\n## Index Optimization Strategies\n\n### B-Tree Indexes\n- **Default Choice**: Best for range queries, sorting, and equality matches\n- **Column Order**: Most selective columns first for composite indexes\n- **Prefix Matching**: Supports leading column subset queries\n- **Maintenance Cost**: Balanced tree structure with logarithmic operations\n\n### Hash Indexes\n- **Equality Queries**: Optimal for exact match lookups\n- **Memory Efficiency**: Constant-time access for single-value queries\n- **Range Limitations**: Cannot support range or partial matches\n- **Use Cases**: Primary keys, unique constraints, cache keys\n\n### Composite Indexes\n```sql\n-- Query pattern determines optimal column order\n-- Query: WHERE status = 'active' AND created_date > '2023-01-01' ORDER BY priority DESC\nCREATE INDEX idx_task_status_date_priority \nON tasks (status, created_date, priority DESC);\n\n-- Query: WHERE user_id = 123 AND category IN ('A', 'B') AND date_field BETWEEN '...' AND '...'\nCREATE INDEX idx_user_category_date \nON user_activities (user_id, category, date_field);\n```\n\n### Covering Indexes\n```sql\n-- Include additional columns to avoid table lookups\nCREATE INDEX idx_user_email_covering \nON users (email) \nINCLUDE (first_name, last_name, status);\n\n-- Query can be satisfied entirely from the index\n-- SELECT first_name, last_name, status FROM users WHERE email = 'user@example.com';\n```\n\n### Partial Indexes\n```sql\n-- Index only relevant subset of data\nCREATE INDEX idx_active_users_email \nON users (email) \nWHERE status = 'active';\n\n-- Index for recent orders only\nCREATE INDEX idx_recent_orders_customer \nON orders (customer_id, created_at) \nWHERE created_at > CURRENT_DATE - INTERVAL '30 days';\n```\n\n## Query Analysis & Optimization\n\n### Query Patterns Recognition\n1. **Equality Filters**: Single-column B-tree indexes\n2. **Range Queries**: B-tree with proper column ordering\n3. **Text Search**: Full-text indexes or trigram indexes\n4. **Join Operations**: Foreign key indexes on both sides\n5. **Sorting Requirements**: Indexes matching ORDER BY clauses\n\n### Index Selection Algorithm\n```\n1. Identify WHERE clause columns\n2. Determine most selective columns first\n3. Consider JOIN conditions\n4. Include ORDER BY columns if possible\n5. Evaluate covering index opportunities\n6. Check for existing overlapping indexes\n```\n\n## Data Modeling Patterns\n\n### Star Schema (Data Warehousing)\n```sql\n-- Central fact table\nCREATE TABLE sales_facts (\n    sale_id BIGINT PRIMARY KEY,\n    product_id INT REFERENCES products(id),\n    customer_id INT REFERENCES customers(id),\n    date_id INT REFERENCES date_dimension(id),\n    store_id INT REFERENCES stores(id),\n    quantity INT,\n    unit_price DECIMAL(8,2),\n    total_amount DECIMAL(10,2)\n);\n\n-- Dimension tables\nCREATE TABLE date_dimension (\n    id INT PRIMARY KEY,\n    date_value DATE,\n    year INT,\n    quarter INT,\n    month INT,\n    day_of_week INT,\n    is_weekend BOOLEAN\n);\n```\n\n### Snowflake Schema\n```sql\n-- Normalized dimension tables\nCREATE TABLE products (\n    id INT PRIMARY KEY,\n    name VARCHAR(200),\n    category_id INT REFERENCES product_categories(id),\n    brand_id INT REFERENCES brands(id)\n);\n\nCREATE TABLE product_categories (\n    id INT PRIMARY KEY,\n    name VARCHAR(100),\n    parent_category_id INT REFERENCES product_categories(id)\n);\n```\n\n### Document Model (JSON Storage)\n```sql\n-- Flexible document storage with indexing\nCREATE TABLE documents (\n    id UUID PRIMARY KEY,\n    document_type VARCHAR(50),\n    data JSONB,\n    created_at TIMESTAMP DEFAULT NOW(),\n    updated_at TIMESTAMP DEFAULT NOW()\n);\n\n-- Index on JSON properties\nCREATE INDEX idx_documents_user_id \nON documents USING GIN ((data->>'user_id'));\n\nCREATE INDEX idx_documents_status \nON documents ((data->>'status')) \nWHERE document_type = 'order';\n```\n\n### Graph Data Patterns\n```sql\n-- Adjacency list for hierarchical data\nCREATE TABLE categories (\n    id INT PRIMARY KEY,\n    name VARCHAR(100),\n    parent_id INT REFERENCES categories(id),\n    level INT,\n    path VARCHAR(500)  -- Materialized path: \"/1/5/12/\"\n);\n\n-- Many-to-many relationships\nCREATE TABLE relationships (\n    id UUID PRIMARY KEY,\n    from_entity_id UUID,\n    to_entity_id UUID,\n    relationship_type VARCHAR(50),\n    created_at TIMESTAMP,\n    INDEX (from_entity_id, relationship_type),\n    INDEX (to_entity_id, relationship_type)\n);\n```\n\n## Migration Strategies\n\n### Zero-Downtime Migration (Expand-Contract Pattern)\n\n**Phase 1: Expand**\n```sql\n-- Add new column without constraints\nALTER TABLE users ADD COLUMN new_email VARCHAR(255);\n\n-- Backfill data in batches\nUPDATE users SET new_email = email WHERE id BETWEEN 1 AND 1000;\n-- Continue in batches...\n\n-- Add constraints after backfill\nALTER TABLE users ADD CONSTRAINT users_new_email_unique UNIQUE (new_email);\nALTER TABLE users ALTER COLUMN new_email SET NOT NULL;\n```\n\n**Phase 2: Contract**\n```sql\n-- Update application to use new column\n-- Deploy application changes\n-- Verify new column is being used\n\n-- Remove old column\nALTER TABLE users DROP COLUMN email;\n-- Rename new column\nALTER TABLE users RENAME COLUMN new_email TO email;\n```\n\n### Data Type Changes\n```sql\n-- Safe string to integer conversion\nALTER TABLE products ADD COLUMN sku_number INTEGER;\nUPDATE products SET sku_number = CAST(sku AS INTEGER) WHERE sku ~ '^[0-9]+$';\n-- Validate conversion success before dropping old column\n```\n\n## Partitioning Strategies\n\n### Horizontal Partitioning (Sharding)\n```sql\n-- Range partitioning by date\nCREATE TABLE sales_2023 PARTITION OF sales\nFOR VALUES FROM ('2023-01-01') TO ('2024-01-01');\n\nCREATE TABLE sales_2024 PARTITION OF sales\nFOR VALUES FROM ('2024-01-01') TO ('2025-01-01');\n\n-- Hash partitioning by user_id\nCREATE TABLE user_data_0 PARTITION OF user_data\nFOR VALUES WITH (MODULUS 4, REMAINDER 0);\n\nCREATE TABLE user_data_1 PARTITION OF user_data\nFOR VALUES WITH (MODULUS 4, REMAINDER 1);\n```\n\n### Vertical Partitioning\n```sql\n-- Separate frequently accessed columns\nCREATE TABLE users_core (\n    id INT PRIMARY KEY,\n    email VARCHAR(255),\n    status VARCHAR(20),\n    created_at TIMESTAMP\n);\n\n-- Less frequently accessed profile data\nCREATE TABLE users_profile (\n    user_id INT PRIMARY KEY REFERENCES users_core(id),\n    bio TEXT,\n    preferences JSONB,\n    last_login TIMESTAMP\n);\n```\n\n## Connection Management\n\n### Connection Pooling\n- **Pool Size**: CPU cores × 2 + effective spindle count\n- **Connection Lifetime**: Rotate connections to prevent resource leaks\n- **Timeout Settings**: Connection, idle, and query timeouts\n- **Health Checks**: Regular connection validation\n\n### Read Replicas Strategy\n```sql\n-- Write queries to primary\nINSERT INTO users (email, name) VALUES ('user@example.com', 'John Doe');\n\n-- Read queries to replicas (with appropriate read preference)\nSELECT * FROM users WHERE status = 'active';  -- Route to read replica\n\n-- Consistent reads when required\nSELECT * FROM users WHERE id = LAST_INSERT_ID();  -- Route to primary\n```\n\n## Caching Layers\n\n### Cache-Aside Pattern\n```python\ndef get_user(user_id):\n    # Try cache first\n    user = cache.get(f\"user:{user_id}\")\n    if user is None:\n        # Cache miss - query database\n        user = db.query(\"SELECT * FROM users WHERE id = %s\", user_id)\n        # Store in cache\n        cache.set(f\"user:{user_id}\", user, ttl=3600)\n    return user\n```\n\n### Write-Through Cache\n- **Consistency**: Always keep cache and database in sync\n- **Write Latency**: Higher due to dual writes\n- **Data Safety**: No data loss on cache failures\n\n### Cache Invalidation Strategies\n1. **TTL-Based**: Time-based expiration\n2. **Event-Driven**: Invalidate on data changes\n3. **Version-Based**: Use version numbers for consistency\n4. **Tag-Based**: Group related cache entries\n\n## Database Selection Guide\n\n### SQL Databases\n**PostgreSQL**\n- **Strengths**: ACID compliance, complex queries, JSON support, extensibility\n- **Use Cases**: OLTP applications, data warehousing, geospatial data\n- **Scale**: Vertical scaling with read replicas\n\n**MySQL**\n- **Strengths**: Performance, replication, wide ecosystem support\n- **Use Cases**: Web applications, content management, e-commerce\n- **Scale**: Horizontal scaling through sharding\n\n### NoSQL Databases\n\n**Document Stores (MongoDB, CouchDB)**\n- **Strengths**: Flexible schema, horizontal scaling, developer productivity\n- **Use Cases**: Content management, catalogs, user profiles\n- **Trade-offs**: Eventual consistency, complex queries limitations\n\n**Key-Value Stores (Redis, DynamoDB)**\n- **Strengths**: High performance, simple model, excellent caching\n- **Use Cases**: Session storage, real-time analytics, gaming leaderboards\n- **Trade-offs**: Limited query capabilities, data modeling constraints\n\n**Column-Family (Cassandra, HBase)**\n- **Strengths**: Write-heavy workloads, linear scalability, fault tolerance\n- **Use Cases**: Time-series data, IoT applications, messaging systems\n- **Trade-offs**: Query flexibility, consistency model complexity\n\n**Graph Databases (Neo4j, Amazon Neptune)**\n- **Strengths**: Relationship queries, pattern matching, recommendation engines\n- **Use Cases**: Social networks, fraud detection, knowledge graphs\n- **Trade-offs**: Specialized use cases, learning curve\n\n### NewSQL Databases\n**Distributed SQL (CockroachDB, TiDB, Spanner)**\n- **Strengths**: SQL compatibility with horizontal scaling\n- **Use Cases**: Global applications requiring ACID guarantees\n- **Trade-offs**: Complexity, latency for distributed transactions\n\n## Tools & Scripts\n\n### Schema Analyzer\n- **Input**: SQL DDL files, JSON schema definitions\n- **Analysis**: Normalization compliance, constraint validation, naming conventions\n- **Output**: Analysis report, Mermaid ERD, improvement recommendations\n\n### Index Optimizer\n- **Input**: Schema definition, query patterns\n- **Analysis**: Missing indexes, redundancy detection, selectivity estimation\n- **Output**: Index recommendations, CREATE INDEX statements, performance projections\n\n### Migration Generator\n- **Input**: Current and target schemas\n- **Analysis**: Schema differences, dependency resolution, risk assessment\n- **Output**: Migration scripts, rollback plans, validation queries\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## 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.","readmeExcerpt":"Database Designer - POWERFUL Tier Skill Overview A 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. Core Competencies Schema Design & Analysis - **Normalization Ana","codeSnippets":[],"executableExamples":[{"language":"sql","snippet":"-- BAD: Multiple phone numbers in one column\nCREATE TABLE contacts (\n    id INT PRIMARY KEY,\n    name VARCHAR(100),\n    phones VARCHAR(200)  -- \"123-456-7890, 098-765-4321\"\n);\n\n-- GOOD: Separate table for phone numbers\nCREATE TABLE contacts (\n    id INT PRIMARY KEY,\n    name VARCHAR(100)\n);\n\nCREATE TABLE contact_phones (\n    id INT PRIMARY KEY,\n    contact_id INT REFERENCES contacts(id),\n    phone_number VARCHAR(20),\n    phone_type VARCHAR(10)\n);"},{"language":"sql","snippet":"-- BAD: Student course table with partial dependencies\nCREATE TABLE student_courses (\n    student_id INT,\n    course_id INT,\n    student_name VARCHAR(100),  -- Depends only on student_id\n    course_name VARCHAR(100),   -- Depends only on course_id\n    grade CHAR(1),\n    PRIMARY KEY (student_id, course_id)\n);\n\n-- GOOD: Separate tables eliminate partial dependencies\nCREATE TABLE students (\n    id INT PRIMARY KEY,\n    name VARCHAR(100)\n);\n\nCREATE TABLE courses (\n    id INT PRIMARY KEY,\n    name VARCHAR(100)\n);\n\nCREATE TABLE enrollments (\n    student_id INT REFERENCES students(id),\n    course_id INT REFERENCES courses(id),\n    grade CHAR(1),\n    PRIMARY KEY (student_id, course_id)\n);"},{"language":"sql","snippet":"-- BAD: Employee table with transitive dependency\nCREATE TABLE employees (\n    id INT PRIMARY KEY,\n    name VARCHAR(100),\n    department_id INT,\n    department_name VARCHAR(100),  -- Depends on department_id, not employee id\n    department_budget DECIMAL(10,2) -- Transitive dependency\n);\n\n-- GOOD: Separate department information\nCREATE TABLE departments (\n    id INT PRIMARY KEY,\n    name VARCHAR(100),\n    budget DECIMAL(10,2)\n);\n\nCREATE TABLE employees (\n    id INT PRIMARY KEY,\n    name VARCHAR(100),\n    department_id INT REFERENCES departments(id)\n);"},{"language":"sql","snippet":"-- Store calculated values to avoid expensive joins\nCREATE TABLE orders (\n    id INT PRIMARY KEY,\n    customer_id INT REFERENCES customers(id),\n    customer_name VARCHAR(100), -- Denormalized from customers table\n    order_total DECIMAL(10,2),  -- Denormalized calculation\n    created_at TIMESTAMP\n);"},{"language":"sql","snippet":"-- Pre-computed summary tables\nCREATE TABLE customer_statistics (\n    customer_id INT PRIMARY KEY,\n    total_orders INT,\n    lifetime_value DECIMAL(12,2),\n    last_order_date DATE,\n    updated_at TIMESTAMP\n);"},{"language":"sql","snippet":"-- Query pattern determines optimal column order\n-- Query: WHERE status = 'active' AND created_date > '2023-01-01' ORDER BY priority DESC\nCREATE INDEX idx_task_status_date_priority \nON tasks (status, created_date, priority DESC);\n\n-- Query: WHERE user_id = 123 AND category IN ('A', 'B') AND date_field BETWEEN '...' AND '...'\nCREATE INDEX idx_user_category_date \nON user_activities (user_id, category, date_field);"}],"parameters":{},"dependencies":[],"permissions":[],"extractedFiles":[],"languages":["typescript"],"docsSourceLabel":"CLAWHUB","editorialOverview":"Database Designer - POWERFUL Tier Skill Database Designer - POWERFUL Tier Skill Overview A 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. Core Competencies Schema Design & Analysis - **Normalization Ana","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":358,"uniquenessScore":68,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T10:46:24.686Z","emptyReason":null},"items":[{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-10T18:48:31.762Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}