Templates
Types
EN

AI ERD Generator from Description

Describe entities and relationships. Get a Mermaid ERD with keys and cardinality.

Try one of these — click to open in the generator

When to use AI ERD Generator from Description

Building an ERD in chat mode, from one vague sentence

An ERD generator working from a one-line description has to guess every cardinality you left out — one-to-many or many-to-many, join table or foreign key, nullable or not. Chat mode asks about the one cardinality that changes the shape of the schema, drafts the rest, and then lists what it made up so you can strike anything wrong. Here is the schema behind an applicant tracking system, built from a deliberately vague opening line.

Draw the database for our hiring tool.
AskUserQuestion
Is an application its own table between candidates and jobs, or does each candidate belong to a single job?
Its own table — people apply to several jobs, and re-apply to the same job later
One job per candidate, job_id sits on the candidate row
One application per candidate, ever
First draft. APPLICATION is a join table because you said people re-apply. Everything else — departments, panel interviews, timestamps — is inference, and gets listed below rather than asked about.
First draft. APPLICATION is a join table because you said people re-apply. Everything else — departments, panel interviews, timestamps — is inference, and gets listed below rather than asked about.
I filled in a few things you didn't mention
  • Added a DEPARTMENT entity and hung job.department_id off it
  • Made an interview a panel — several interviewers, each filing their own scorecard, hence INTERVIEW_PANELIST
  • Gave APPLICATION a stage column (screening / onsite / offer / rejected)
  • Added created_at on CANDIDATE, JOB and APPLICATION
  • Typed every primary key as bigint, with foreign keys matching
Looks goodRemove 1
Dropped DEPARTMENT, and job.department_id went with it. Jobs now stand on their own.
An application can end in more than one offer — we counter sometimes — so add an OFFER table with a version, base salary, start date and status. Don't put created_at on it, and don't add created_at to any new table after this either; we read timestamps off the event log.
Final ERD. OFFER is one-to-many off APPLICATION, and the created_at exclusion holds for every table added from here on.
Final ERD. OFFER is one-to-many off APPLICATION, and the created_at exclusion holds for every table added from here on.

Four messages produced two join tables, an application row you can have more than one of per candidate-job pair, and a versioned offer — none of which were in "draw the database for our hiring tool". Sent one-shot, the same line gets you candidate.job_id, one interviewer per interview, and a created_at on every table you would then strip by hand.

Start this conversation →Opens the generator in chat mode with the first message already filled in.

Deep dive

Entity relationship diagrams (ERDs) are how you communicate a database schema without dumping raw DDL on the reader. They show entities as tables, their columns with types, primary and foreign keys, and — critically — the cardinality of relationships (one-to-one, one-to-many, many-to-many).

Reach for an ERD when you're designing a new schema before writing migrations, when you're onboarding an engineer to an existing codebase, or when you're writing an architecture doc that needs to justify why the data model looks the way it does. They're also invaluable when planning a migration or refactor — you can annotate which tables are being consolidated or split.

Mermaid's erDiagram syntax uses crow's foot notation and supports column types, PK/FK markers, and relationship labels, which makes it detailed enough for real design docs. Where it falls short: it doesn't show indexes, constraints beyond keys, or physical storage details. For those, a full modeling tool like dbdiagram.io or an ORM's schema visualization tool goes deeper — but for the 90% of "let's talk about the shape of this data" conversations, an ERD in plain text you can commit alongside your migration files is exactly right.

Ready to try it yourself?

Frequently asked questions

Prefer a conversation?

Not sure how to phrase your prompt? Chat mode lets AI ask 2-3 clarifying questions about actors, events, and edge cases — then draws.

Try Chat to Diagram

Want to draw better diagrams?

Read our in-depth tutorials — symbols, structures, 9 rules, and copy-paste prompt templates for real-world flows.

Read the tutorials

Related tools