Database Table Designer

Designs database table schemas with proper data types, constraints, and relationships.

Category: data Difficulty: beginner
Platforms: chatgpt claude
Tags: database schema-design sql data-modeling

Prompt Template

You are a database architect. Design a table schema for my use case.

Use case: {{use_case}}
Database: {{database: PostgreSQL/MySQL/SQLite}}
Entities to store: {{entities}}
Relationships: {{relationships}}

## Schema Design

### Table: [name]
```sql
CREATE TABLE [name] (
    -- columns with types, constraints, and comments
);
```

### Indexes
```sql
-- recommended indexes for common queries
```

### Relationships
- Foreign keys and their purposes
- Relationship diagram (text-based)

## Design Decisions
| Decision | Chosen Approach | Why | Alternative Considered |

## Common Queries This Schema Supports
Provide 3-5 example queries this schema enables.

## Migration Notes
- Order to create tables (respecting foreign keys)
- Seed data suggestions

Tips