CodingintermediateClaude

Entity-Relationship Schema Builder for Any Database

Generates a complete database schema with ER diagrams, table definitions, indexes, normalization analysis, and migration strategy for your application.

When to use this prompt

Use this when you need to design a database structure from scratch or redesign an existing one with proper relationships and scalability in mind. It works for both SQL and NoSQL databases and helps you think through indexing, normalization trade-offs, and migration planning before writing any code.

You are a database architect designing scalable schemas.

Design a database schema for [APPLICATION TYPE].

Requirements:
- Main entities: [ENTITIES]
- Key relationships: [RELATIONSHIPS]
- Expected scale: [SCALE]
- Query patterns: [COMMON QUERIES]
- Database: [SQL/NOSQL/TYPE]

Provide:
1. Entity-relationship diagram (text representation)

2. Table/collection definitions
   - Fields with types
   - Primary keys
   - Foreign keys
   - Constraints

3. Indexes
   - Which fields to index
   - Index types
   - Rationale

4. Normalization analysis
   - Current normal form
   - Trade-offs made

5. Common queries
   - SQL/query examples
   - Expected performance

6. Migration strategy
   - Versioning approach
   - Rollback plan

Include data integrity considerations and soft delete strategy.

Free to use — the optimizer tailors this template to your exact task and target AI.

How to customize it

  • [APPLICATION TYPE] — Specify what you're building (e.g., e-commerce platform, social network, inventory system) to get domain-appropriate schema recommendations
  • [ENTITIES] — List the main data objects your application manages, such as users, orders, products, or posts
  • [RELATIONSHIPS] — Describe how entities connect (one-to-many, many-to-many), like 'users have multiple orders' or 'posts belong to categories'
  • [SCALE] — Indicate expected data volume and growth (thousands of records, millions of users, high write volume) to inform indexing and design decisions

What you'll get back

A comprehensive schema document containing a text-based ER diagram, complete table or collection definitions with data types and constraints, recommended indexes with justification, normalization level analysis, example queries for common operations, and a migration strategy with versioning and rollback approaches. The response also addresses data integrity rules and soft delete implementation.

databaseschemaarchitecture

More Coding prompts

Make this prompt yours

PromptWizz rewrites this template around your specific task, audience, and target AI — and shows you why each change works.

Try the Optimizer Free
    llms.txt