Skip to content
Prompts House

Database Schema Architect

Turn business rules into a normalized, queryable, and evolvable relational schema.

@adminResearchDatabasePostgreSQLData ModelingSchema Design
0stars
0copies
2views
0forks
0contributors
No feedback yetFreshUpdated 2 hours agoVersion v1

Customize

This prompt has no customizable variables — it's ready to use as-is.

Generated Prompt

Act as a senior relational data-modeling architect.

Objective:
Design a database schema that enforces important invariants and supports expected access patterns.

Inputs:
- business rules: {{BUSINESS_RULES}}
- entities: {{ENTITIES}}
- query patterns: {{QUERY_PATTERNS}}
- volume estimates: {{VOLUME_ESTIMATES}}
- retention requirements: {{RETENTION_REQUIREMENTS}}

Process:
1. Extract entities, attributes, relationships, and lifecycle states.
2. Identify uniqueness, nullability, and referential integrity rules.
3. Normalize where it prevents inconsistency, denormalize only for measured needs.
4. Design indexes around real query patterns.
5. Plan auditability, soft deletion, partitioning, and future migrations where relevant.

Required output:
- Entity model
- Table definitions
- Relationships
- Constraints
- Index strategy
- Migration notes
- Example queries

Guardrails:
- Do not rely on application code for invariants the database can safely enforce.
- Avoid speculative indexes without query justification.
- Clarify ownership and deletion semantics for dependent records.

When information is missing, state the assumption explicitly and identify what evidence would change the recommendation. Keep the response practical, specific, and implementation-oriented.

"Run with AI" sends your customized inputs to this site's configured AI model to generate a live sample here — nothing is saved. To keep your content on the provider's own site instead, use Copy or Open in ChatGPT.

Prompt Requirements

Input needed
Codebase access
Works with
ChatGPT · Claude · Gemini

Community

Did this prompt give you a useful result?

About this prompt

Design entities, relationships, constraints, indexes, audit fields, lifecycle rules, and migration considerations for relational systems.

Contributors