Lucidchart Alternatives for Database Diagrams (2026): 7 Tools Compared
For developers and database designers who draw ER diagrams in Lucidchart and need them to match the database they describe.
On this page
An ER diagram in Lucidchart shows the database as it was on the day of the last import. Lucidchart's ERD import reads a query result rather than the database. You run Lucidchart's query and paste the result, again after each migration (a change to the schema). The alternative with no query to paste is DbSchema. It connects to the database over JDBC, reads the tables and foreign keys itself, and lists what changed when you refresh.
The pages that rank for this search also name ChartDB, dbdiagram.io, Microsoft Visio, draw.io and Miro. After each migration, some of these tools read the database again, and with the others you update the diagram yourself.
Who reads the database, you or the tool
A relational database lists its tables, columns and foreign keys in its catalog, a set of system tables. DbSchema connects to the database and reads the catalog. Lucidchart, ChartDB and dbdiagram.io draw the diagram from a query result or from text that you give them. Visio, draw.io and Miro are canvases where you place the tables as shapes. Two exceptions can also read a database: dbdiagram.io's command-line tool and Visio Plan 2.
Lucidchart draws from a query result. Its help center describes the import. You pick your database system and copy the query that Lucidchart shows. Then you run that query on your database, and upload or paste the result. The ERD features are on every plan, Free included.
After a migration, you run the query again and import the new result. Lucidchart updates the table fields and offers to update the shapes on the canvas too. Lucidchart can export the diagram to SQL, without the connections between tables (the foreign keys). Lucidchart can also create an ERD with AI.
The values below come from each vendor's own pages, read on 11 November 2026:
| Tool | Where the tables come from | Cheapest plan |
|---|---|---|
| DbSchema | The database, read over JDBC | Community Edition, free |
| Lucidchart | A query result you run and paste | Free plan |
| ChartDB | A query result you run and paste | Free plan, up to 10 tables |
| dbdiagram.io | DBML text, an SQL import, or its command-line tool | Free plan, up to 10 projects |
| Microsoft Visio | Shapes, and in Plan 2 a wizard for SQL Server 2016 and earlier | Plan 1 for ERD shapes, 5 USD a user a month |
| draw.io | Shapes, or pasted CREATE TABLE statements | Free, Apache 2.0 |
| Miro | Shapes, or Mermaid code | Free plan, 3 editable boards |
DbSchema reads the diagram from the database
Take two tables with one foreign key between them:
CREATE TABLE customers (id integer PRIMARY KEY, email text NOT NULL);
CREATE TABLE orders (
id integer PRIMARY KEY,
customer_id integer NOT NULL REFERENCES customers (id),
total numeric(10,2)
);
The database stores this foreign key in its catalog, so nobody has to draw it. This query reads the foreign key from PostgreSQL's information schema, a set of views over the catalog:
SELECT tc.table_name, kcu.column_name,
ccu.table_name AS references_table, ccu.column_name AS references_column
FROM information_schema.table_constraints tc
JOIN information_schema.key_column_usage kcu
ON kcu.constraint_name = tc.constraint_name AND kcu.table_schema = tc.table_schema
JOIN information_schema.constraint_column_usage ccu
ON ccu.constraint_name = tc.constraint_name AND ccu.table_schema = tc.table_schema
WHERE tc.constraint_type = 'FOREIGN KEY';
On PostgreSQL 18.6, it returns one row:
| table_name | column_name | references_table | references_column |
|---|---|---|---|
| orders | customer_id | customers | id |
DbSchema connects to more than 100 databases, and reads the schema through each database's JDBC driver. DbSchema downloads the driver the first time you connect. Choose File → New Model, keep Connect to Database selected, pick your database and connect. In Reverse Engineer the Database, tick the schemas and press Import. DbSchema draws each table, with its foreign keys as lines (connect to a database).
Connecting and reverse-engineering are in the free Community Edition, and both only read from the database. If two tables are related in the data but have no foreign key, add a virtual foreign key. A virtual foreign key exists only in the DbSchema model, DbSchema's own copy of the schema.
For a large schema, use Diagram → New Diagram in DbSchema. It opens a second diagram of the same model, with only the tables you pick. Diagram → Auto Arrange Tables lays out the tables along their foreign keys, so you don't place them by hand.
In DbSchema Pro, save the model with File → Save Model to File. The saved .dbs file holds the tables, keys and diagrams, and DbSchema's built-in Git shares the file with your team. While you work offline, your edits stay in the model. The database changes only when you synchronize the model and the database.
Then somebody runs a migration:
ALTER TABLE orders ADD COLUMN shipped_at timestamptz;
In DbSchema Pro, Database → Refresh Model from Database compares the model with the database and counts the differences. Choose Review Differences to open the Synchronize Model and Database dialog, with one row per difference. For each row, you choose which side to keep: the model's version or the database's (schema synchronization).
The buttons at the bottom of the dialog apply your choices to the model, commit them in the database, or generate the SQL script without running it. In DbSchema Pro, File → Export As... → HTML5/PDF Documentation exports the model as HTML5 documentation with the diagram. The documentation lets colleagues without DbSchema read the diagram.
ChartDB draws the schema from one query result
ChartDB is a diagram app that runs in the browser. You run ChartDB's query on your database and paste the JSON result, and ChartDB draws the tables. According to its GitHub README, ChartDB supports PostgreSQL, MySQL, SQL Server, MariaDB, SQLite, CockroachDB and ClickHouse. The code is under the AGPL-3.0 license. The README shows how to run ChartDB on your own server with Docker.
On ChartDB's pricing page, the Free plan covers one user and one database of up to 10 tables. Pro costs 25 USD a month for one person, allows 100 tables, and adds a DBML editor and schema export. DBML is the text format of dbdiagram.io. The Team plan, listed at 59 USD, covers up to 3 users and 5 databases. It adds real-time collaboration, auto-sync and database migration.
dbdiagram.io draws the schema from DBML text
dbdiagram.io turns text into a diagram. You write each table in DBML, the schema language of dbdiagram.io. A ref on a column draws the foreign key. The customers and orders tables from above look like this in DBML:
Table customers {
id integer [pk]
email text [not null]
}
Table orders {
id integer [pk]
customer_id integer [not null, ref: > customers.id]
total decimal(10,2)
}
On dbdiagram.io's pricing page, the Free plan includes SQL import and export and up to 10 projects, which one person can edit. Personal Pro costs 8 USD a month and Team costs 75 USD a month. dbdiagram.io's db2dbml command-line tool reads a live database. db2dbml connects to PostgreSQL, MySQL, SQL Server, Snowflake, BigQuery or Oracle and writes the schema as DBML.
Microsoft Visio draws ER diagrams from shapes
Visio Plan 1 is the cheapest plan with shapes for ER diagrams and UML class diagrams. Plan 1 is a web app at 5 USD per user a month, paid yearly (Visio plans).
Visio Plan 2 costs 15 USD per user a month, paid yearly, and adds the desktop app. In the desktop app, the Database Model Diagram template has a Reverse Engineer button on the Database tab. This button reads an existing database. According to Microsoft's support page, Reverse Engineer works with SQL Server 2016 and earlier, and not with SQL Server 2019 or newer.
draw.io turns CREATE TABLE statements into shapes
draw.io is a free diagram tool. It works inside Google Drive, Docs and Slides, and also with SharePoint, OneDrive, Teams, Confluence, Jira, GitHub and VS Code. Its source code is under the Apache 2.0 license. You can use drawio.com without an account.
Arrange → Insert → Advanced → SQL turns pasted CREATE TABLE statements, such as the customers and orders tables, into entity shapes with their columns. After the insert, the draw.io manual tells you to "rearrange and connect the entities". You draw the line from orders to customers by hand.
Miro is a whiteboard with ER shapes
Miro is an online whiteboard for team work. On its ER diagram page, Miro offers an ERD shapes pack. Miro's Mermaid integration draws an ER diagram from Mermaid, a text language for diagrams. You export the diagram as an image or a PDF.
Miro's pricing page lists a Free plan with 3 editable boards. Starter costs 8 USD and Business 20 USD per member a month, billed yearly. Starter can also import Visio and Lucidchart files.
Diagram your own database
Download DbSchema and connect it to the database whose diagram is out of date. Reverse-engineer the database, and the free Community Edition draws the tables and their foreign keys. Saving and refreshing the model file, synchronizing, and the HTML5 documentation need DbSchema Pro. The download starts with a 15-day trial of every paid feature.
Sources
- DbSchema: connect to a database
- DbSchema: foreign keys
- DbSchema: Git
- DbSchema: diagrams
- DbSchema: schema synchronization
- DbSchema: schema documentation
- Lucid: create an entity relationship diagram in Lucidchart
- ChartDB README
- ChartDB pricing
- dbdiagram.io pricing
- DBML command-line tools
- Microsoft: Visio plans and pricing
- Microsoft: reverse engineer an existing database into a database model
- draw.io
- draw.io manual: insert SQL
- Miro: ER diagram
- Miro pricing
Diagram the database you actually have
DbSchema reverse-engineers a live schema over JDBC, keeps the layout in a versionable .dbs model file, and generates the migration script when the design moves. Interactive diagrams and the SQL editor are in the free Community edition.