---
name: sql-schema-designer
description: "Design relational database schemas and generate the CREATE TABLE statements. Use when the user wants help with SQL Schema Designer. Related topics: sql, database, architecture."
---

# SQL Schema Designer

Design relational database schemas and generate the CREATE TABLE statements.

## How to use this skill

1. Ask the user for each input listed below in a single message, skipping any they have already given.
2. Where options are listed, offer them, but accept other answers too.
3. Fill the answers into the prompt template, then follow the completed prompt to produce the result.

## Inputs

- **Describe the app and its main entities** (longer free text)
- **Database System** (choose one: PostgreSQL, MySQL, SQLite, SQL Server)
- **Use UUIDs for primary keys?** (choose one: Yes, No)
- **Elements to include** (choose any: Foreign Keys, Indexes, Timestamps (created_at), Constraints (UNIQUE/NOT NULL))
- **Include sample INSERT statements for testing?** (choose one: Yes, No)

## Prompt template

## Introduction
Architect a database schema based on your application's requirements.

## App Requirements
- Describe the app and its main entities: {{Describe the app and its main entities}}
- Database System: {{Database System}}

## Schema Preferences
- Use UUIDs for primary keys? {{Use UUIDs for primary keys?}}
- Elements to include: {{Elements to include}}
- Include sample INSERT statements for testing? {{Include sample INSERT statements for testing?}}

---
**Goal**: Provide a detailed schema explanation followed by the exact SQL code to create the tables.

---

Source: [SQL Schema Designer on PromptBuild](https://promptbuild.io/prompt/WJ8gMbYm5cp5EQ0AKLVS/sql-schema-designer)
