Prompt library

Database Schema Design Prompts

Schema prompts work best when they name the main entities, ownership relationships, and the constraints that matter. These examples are designed to create a practical first-pass ERD you can review before locking in tables and columns.

Each prompt here is built for AI-native technical diagrams in AIDrawIO. Start from plain English, get draw.io-compatible output, then keep editing as XML or export SVG and PNG.

Copyable prompt blocks

Grab a proven prompt quickly instead of composing from scratch every time.

Refinement-ready

Each prompt includes a follow-up so you can add boundaries, detail, and review context.

Editable outputs

Generated diagrams stay compatible with draw.io workflows instead of locking you into images.

Copy and generate

Copyable prompts for database schema design prompts

Use one prompt as-is, or combine it with the follow-up prompt to add labels, constraints, security detail, or failure handling.

Prompt 1

Multi-tenant SaaS schema

Prompt

Create a database schema diagram for a multi-tenant SaaS application with organizations, users, memberships, roles, workspaces, projects, environments, audit_logs, API keys, and subscriptions. Show primary keys, foreign keys, tenant boundary fields, and the main ownership relationships.

Why this prompt works

It captures the parts of the model that usually create complexity in SaaS products: tenancy, access control, and ownership.

Follow-up prompt

Add invoices, usage records, feature flags, and soft-delete fields for key entities.
Prompt 2

Commerce catalog and orders

Prompt

Generate an ERD for an ecommerce platform with customers, addresses, products, product_variants, categories, inventory, carts, cart_items, orders, order_items, payments, refunds, and shipments. Include one-to-many and many-to-many relationships where needed.

Why this prompt works

The prompt names both the catalog side and the order lifecycle side, which leads to a fuller schema diagram than a product-only or checkout-only view.

Follow-up prompt

Add warehouse inventory, discount rules, and tax calculation entities.
Prompt 3

Product analytics event model

Prompt

Draw a database schema design for a product analytics platform with organizations, users, events, event_properties, sessions, page_views, dashboards, saved_queries, data_sources, and destinations. Mark high-volume append-only entities separately from configuration tables.

Why this prompt works

It helps the model separate operational configuration data from high-volume event data, which makes the diagram easier to reason about.

Follow-up prompt

Add retention policy fields, partitioning notes, and the relationship between raw events and aggregated reporting tables.

How to use these prompts

From prompt to editable diagram

1

Pick a base prompt

Choose the closest prompt for your architecture, workflow, or schema.

2

Generate in AIDrawIO

Paste it into the app and create the first structured draft fast.

3

Refine with follow-up

Add more scope like failure paths, zones, labels, or compliance detail.

4

Export and share

Keep draw.io-compatible XML or export SVG and PNG for docs and review.

Related tools

Jump into a specialized generator when you know the exact diagram category.

More prompt pages

Use adjacent prompt libraries when your diagram crosses categories.

FAQ

Common questions about database schema design prompts

What makes a good database schema design prompt?

A good prompt names the main entities, relationships, keys, and any constraints or tenant boundaries that matter to the schema.

Should I ask for keys and foreign keys explicitly?

Yes, if you want a more concrete ERD. Calling out keys and relationship details usually gives a more useful first draft.

Can AI help with both conceptual and physical schema diagrams?

Yes. You can start with a conceptual ERD, then use follow-up prompts to add columns, keys, or implementation details.