AI entity relationship diagram generator.
Point it at the schema you already have. The relationships are declared, so the diagram is a rendering rather than an interpretation.
What an ER diagram shows
Entities, their attributes, and the relationships between them with cardinality. It describes the shape of the data independently of how it is stored, which is why it survives a migration between databases while a table diagram does not. The most useful thing it does is make an accidental many-to-many or a missing constraint visible.
How Lucid Train draws one
Describe what you want, or point it at a repository. The agent emits a semantic graph of nodes and edges with no coordinates, and the ELK layout engine computes positions and orthogonal routing. That separation is the reason the output cannot come back with boxes overlapping or arrows crossing through cards, which is the characteristic failure when a language model is asked to place things on a canvas itself. It also means editing is editing the graph: change a component and the layout re-solves rather than drifting out of alignment.
Read from the schema, not inferred
Where a foreign key exists, the relationship and its direction are facts rather than guesses; where a unique constraint sits on that key, the cardinality is a fact too. From a Prisma schema or ORM models it is better still, because relations are declared as relations. That is the difference between a diagram you can rely on and one you have to check.
Join tables should not be entities
A table whose primary key is composed entirely of foreign keys is a join table, and drawing it as an entity produces a diagram that matches your storage and not your model. Recognising it and drawing a single many-to-many relationship instead keeps the picture at the level people actually reason about.
Local, offline, your models
It runs as a desktop application. Against a local Ollama model the whole thing works offline with no API key and no telemetry, which is the practical difference from every browser-based diagram tool: your architecture never leaves the machine.
Cardinality notation
| Notation | Meaning |
|---|---|
| One to one | Each row on one side matches at most one on the other |
| One to many | The standard foreign key relationship |
| Many to many | Realised through a join table, drawn as one relationship |
| Mandatory | The foreign key is NOT NULL |
| Optional | The foreign key is nullable |
| Identifying | The child's primary key includes the parent's key |
| Self-referencing | A hierarchy, such as manager or parent category |
Try it
Questions
Can it generate an ER diagram from an existing database?
From a schema dump, yes. It does not connect to a running database, so exporting the schema is the first step, and that also means it works against databases you have no credentials for.
Which sources work?
SQL DDL, migration files, Prisma schemas, Django models, SQLAlchemy, TypeORM and Drizzle. ORM definitions usually give a better diagram because they declare intent that a bare foreign key does not.
Crow's foot or Chen notation?
Crow's foot, since it is what almost every engineering team uses. Chen notation is more common in academic material and is rarely what a working team wants in a repository.
Can it design a schema rather than document one?
Yes, describe the domain and it proposes entities and relationships. It is a starting point for a discussion about the model, not a substitute for having one.
Related
- AI Data Flow Diagram GeneratorWhere the data comes from, what transforms it, where it lands, and which of those crossings leave your control.
- AI C4 Model Diagram GeneratorOne system, drawn at three levels of zoom, so each diagram has one audience instead of trying to serve all of them.
- AI Flowchart GeneratorFor a process with decisions in it, where the question is what happens next rather than what talks to what.
- AI UML Diagram GeneratorIn practice teams use about four of UML's fourteen diagram types, and this draws those four properly rather than all of them badly.
Last updated