Back to guide/General Productivity

Database Schema Design

Explicit table definitions, relationships, and seed data instructions let Bolt generate a complete, normalized schema with proper indexes from the start.

bolt-ai-promptsapp_domaintable_1table_1_description
Edit View
Prompt
Create the database schema for a {{app_domain}} application.\n\nTables:\n1. {{table_1}}{{table_1_description}}\n   Fields: id (UUID, primary key), {{table_1_fields}}, created_at, updated_at\n\n2. {{table_2}}{{table_2_description}}\n   Fields: id (UUID, primary key), {{table_2_fields}}, {{table_1}}_id (foreign key), created_at, updated_at\n\n3. {{table_3}}{{table_3_description}}\n   Fields: id (UUID, primary key), {{table_3_fields}}, created_at, updated_at\n\nRelationships:\n- {{table_1}} has many {{table_2}}\n- {{table_2}} belongs to {{table_1}}\n- {{table_2}} has many {{table_3}} (through join table)\n\nAdd indexes on foreign keys and any field used for filtering. Include seed data with 5 realistic sample rows per table.

Variables to customize

{{app_domain}}{{table_1}}{{table_1_description}}{{table_1_fields}}{{table_2}}{{table_2_description}}{{table_2_fields}}{{table_3}}{{table_3_description}}{{table_3_fields}}

Why this prompt works

Explicit table definitions, relationships, and seed data instructions let Bolt generate a complete, normalized schema with proper indexes from the start.

Save this prompt to your library

Organize, version, and access your best prompts across ChatGPT, Claude, and Cursor.