Back to all posts

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.

Lucidchart's editor with an ER diagram on the canvas and the ERD Import button in the shapes panel on the left

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.

Two rows. Lucidchart ERD import: you run Lucid's query against the database, paste the result, and after a migration run the query and import again. DbSchema: it connects over JDBC and reads the schema, keeps tables and keys in a .dbs model file, and a refresh lists each difference

The values below come from each vendor's own pages, read on 11 November 2026:

ToolWhere the tables come fromCheapest plan
DbSchemaThe database, read over JDBCCommunity Edition, free
LucidchartA query result you run and pasteFree plan
ChartDBA query result you run and pasteFree plan, up to 10 tables
dbdiagram.ioDBML text, an SQL import, or its command-line toolFree plan, up to 10 projects
Microsoft VisioShapes, and in Plan 2 a wizard for SQL Server 2016 and earlierPlan 1 for ERD shapes, 5 USD a user a month
draw.ioShapes, or pasted CREATE TABLE statementsFree, Apache 2.0
MiroShapes, or Mermaid codeFree 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_namecolumn_namereferences_tablereferences_column
orderscustomer_idcustomersid

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).

DbSchema diagram of the customers and orders tables reverse-engineered from the database, with the foreign key from orders.customer_id to customers.id drawn as a line

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 Synchronize Model and Database dialog in DbSchema with three differences, a column only in the model, a renamed column and a table only in the database, and below them the ALTER TABLE statement that the chosen side runs

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

  1. DbSchema: connect to a database
  2. DbSchema: foreign keys
  3. DbSchema: Git
  4. DbSchema: diagrams
  5. DbSchema: schema synchronization
  6. DbSchema: schema documentation
  7. Lucid: create an entity relationship diagram in Lucidchart
  8. ChartDB README
  9. ChartDB pricing
  10. dbdiagram.io pricing
  11. DBML command-line tools
  12. Microsoft: Visio plans and pricing
  13. Microsoft: reverse engineer an existing database into a database model
  14. draw.io
  15. draw.io manual: insert SQL
  16. Miro: ER diagram
  17. 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.