惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
Cisco Talos Blog
Cisco Talos Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
V2EX
博客园 - 三生石上(FineUI控件)
Martin Fowler
Martin Fowler
WordPress大学
WordPress大学
D
Docker
S
SegmentFault 最新的问题
博客园 - 聂微东
美团技术团队
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
M
MIT News - Artificial intelligence
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
GbyAI
GbyAI
L
LangChain Blog
Vercel News
Vercel News
博客园 - 叶小钗
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
Engineering at Meta
Engineering at Meta
T
Threat Research - Cisco Blogs
T
Threatpost
Scott Helme
Scott Helme
T
Tailwind CSS Blog
Latest news
Latest news
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
The Register - Security
The Register - Security
罗磊的独立博客
P
Proofpoint News Feed
腾讯CDC
S
Schneier on Security
雷峰网
雷峰网
A
About on SuperTechFans
T
Tenable Blog
F
Full Disclosure
Cyberwarzone
Cyberwarzone
博客园_首页
有赞技术团队
有赞技术团队
K
Kaspersky official blog

DEV Community

Home-Bottom Row Modifier Clusters We Trusted Auto-Ack. The Queue Agreed. Our Costs Didn't. DevOps for Developers: Reducing Cognitive Load and Boosting Transparency Python pytest: Write Tests That Actually Help You How I bypassed Vercel Serverless timeouts to build a decoupled document ingestion pipeline The Case for a Dedicated Reliability Engineer Next.js SaaS Boilerplate with BetterAuth, RBAC, i18n & Production-Ready Setup Your AI coding agent doesn't need a smarter model. It needs your backlog. I built a free streaming site from scratch — no ads, no framework, no BS I Can't Believe This AI Agent Runs on a $5 VPS — And It Puts $99/Month Frameworks to Shame Beyond Static Prompts: How to Build Self-Improving AI Agents with Closed-Loop Skill Playbooks How I Taught My Incident Alerts to Say "This Broke 3 Minutes After Your Last Deploy" Why I Stopped Treating Job Applications as My Only Career Strategy Stop Watching Tutorials, Start Coding: How I Built CodeQuizz, an AI-Powered Active Learning Engine How We Generate 300+ AI Business Ideas a Month With GPT-5 (and Filter the Junk Out) The Intent Layer Your AI Coding Agent Does Not Need a Bigger Prompt How I solved a problem in my house using with an AI-powered application! Structure: A Local-First Interview IDE Powered by Gemma 4 Build in public, month 2: 615 of 616 visitors never clicked anything Someone wrote a fake EULA into Bitcoin. Two hours later they revoked it. Insights of Git ( part : 1 ) Someone wrote a fake EULA into Bitcoin. Two hours later they revoked it. Payload CMS Has 508 Circular Dependencies. Next.js Has 17. Here's Why They Form in Every Large JS Codebase. Prompt Packs Are Dead. Long Live Skills Why I Started Building a Portfolio Tracker Senior developer" after 3 years is title laundering Stripe Webhook Idempotency in FastAPI: Handling Duplicate Events Without Double-Charging SaaS Customers What Happens Before Your C Program Reaches the CPU? FinOps for Startups: How to Keep Your AWS Bill Under $100/Month Configuring CORS in Azure API Management How RBI Quietly Created a New Billion Dollar Industry in International Payments Time Need To Rearrange Binary String I Updated My GitHub Auto-Commit Desktop App I Have Reviewed Over 400 Resumes for Tech roles. Here Is What Actually Gets You the Phone Screen [Boost] Awesomeness! We built a lightweight, 100% local File Integrity Monitor (FIM) with zero telemetry Building chart() for Tala: From Raw Indicator Data to Something You Can Actually Inspect A client-side secret scanner that physically can't exfiltrate your code (and why you shouldn't trust mine either) Your AI Agent Should Text You First Built free app for game design and worldbuilding You Have a Free AI Model Sitting in Chrome Right Now I created a fork of GunDB and rewrote it in TypeScript using Vibe Code 6 Advanced JavaScript Questions That Separate Seniors from Mid-Levels Claude Does Not Need More Prompts. It Needs Reasoning Discipline. An Introduction to AI Hub, Part 2: Custom MCP Servers I built a RAG pipeline from scratch — no LangChain, just FastAPI + FAISS How I built a dependency risk scanner with Coral in 7 days Local-first: a Model on Your Own Machine, Zero Cloud 2487. Remove Nodes From Linked List C_STD : A Leak-Free, Cross-Platform Standard Library for Modern C How to build your professional network as a developer — authentic strategies The Pope and the Dynamo Building ShouldWeAutomate: A Decision Intelligence Platform for Workflow Automation The Reputation Layer: Why Developers Quietly Run Corporate PR The Last Mile of Software Is a Sentence AppView 1.0.0 Released: Instrument and Secure Your LLM Deployments The Hermes Rescue: How an Open Agent Rebuilt My GitHub Projects from Scratch S2 — Heap Corruption Crashes: How to Diagnose and Fix Them I built a Chrome extension because I couldn't stop opening Twitter between Pomodoro sessions AI cheating in technical interviews is invisible to interviewers — here's how we detect it Lean4 Might Be the Missing Piece in AI: Why Theorem Provers Are Suddenly Everywhere The Zero-Drift API Series: Stop Trusting a Green Build You Can't Explain How I Deployed My First Project on AWS (And Didn't Break Everything) How I Built a Real-Time Quiz Platform with Next.js, WebSockets, and Learning Science When Your VPS Blocks Outbound SMTP: What Actually Helps Los agentes de código necesitan memoria durable, no solo contexto Cognitive Architectures of AGI: 7 Patterns That Transform LLMs from Oracles into Thinkers I Built a Chat App That Deletes Itself (Because I Was Bored at 2am) Uncovering the Power of Linux's History Command How to Add a Contact Form to Your Ghost Blog Accept Payments in Minutes with Afriex Checkout Sessions Hermes Agent Gets Smarter Every Day. So Does the Bill. How I get Next.js sites to load almost instantly — a practical checklist Treasure Hunt Engine: Why One Bad Prometheus Rule Sank the Whole Veltrix Event Test a DNS Leak in 2 Minutes: Complete Methodology + Per-OS Fixes (2026) Lessons from building a Chrome extension Rivet: A library i made in 2 days I Built a Speech-to-Text Tool Because Sometimes Typing Just Gets in the Way How I'm Building a Multi-Agent Crew for AI Coding Supervision (Cipher Update) Your AI Agent Needs a Manager, Not a Superhero I Built CausalLens — A Free, Open-Source Causal Impact Calculator for Time Series (5 Methods, Zero Setup) How to write good commit messages and pull requests — a team guide Cipher: The Jarvis with a Hermes Core How to build a second brain with Obsidian and Claude Code (step by step) Claude completed my MPI assignment. Then it couldn't run it. So I built the missing piece. This 100% How Our Document Ingestion Pipeline Turns Files into LLM-Ready Markdown Agentic AI Model Risk Management: Aligning with Regulatory Expectations CTV Fraud Has an IPv6 Business Problem The great AI enshittification The Veltrix Treasure Hunt Engine: Why Our First Rewrite Cost Us 3.2 Million Requests Per Second I Made My AI Models Argue, Then Let Hermes Be the Judge Road To KiwiEngine #4: The Racecar Driver Analogy Run Aider on Ollama, Bedrock, or Any LLM Provider — One Gateway, Every Model BAIXAR VÍDEO DO YOUTUBE Releasing HeliosProxy, The programmable Postgres data-plane Hello, DEV Community! 👋 Three Bitcoin Primitives That Don't Exist Anywhere Else (PoW Beacon, DLC Oracle, Fair-Launch Rune)
Reverse Engineer Any Database into dbdiagram.io, PlantUML, Mermaid, or QuickDBD - Then Keep Designing
Sualeh Fatehi · 2026-05-31 · via DEV Community

Most database diagram tools stop at documentation. They connect to your database, inspect the schema, and generate a report or a picture. That is useful, but it does not help if your next step is design work.

What if you want to start from an existing database, open the result in a design tool, add a few new tables, adjust relationships, and then turn that updated design back into SQL?

SchemaCrawler supports that workflow.

SchemaCrawler can connect to any database with a JDBC driver and generate editable output in four useful formats:

That gives you a practical round-trip workflow:

  1. Connect to an existing database
  2. Export the schema into DBML, PlantUML, Mermaid or QuickDBD
  3. Edit the design in the tool you already use
  4. Generate DDL from the updated design when you need SQL again

SchemaSpy is strong when you want a browsable HTML report for stakeholders. But HTML is the end of the line. You can read it, click through it, and share it, but you cannot open it in a design tool and keep working. If you need reverse engineer -> edit design -> generate DDL, SchemaCrawler is the better fit.

In this article, I will use the Northwind sample SQLite database for all examples.


Step 1: Connect

Make sure you have Docker installed. Then download the Northwind sample SQLite database into your current directory.

All commands below mount your current directory into the SchemaCrawler container, so the generated files are written back to your machine.

If you are using PowerShell on Windows, replace the trailing backslash on each line with a back-tick "`".


Step 2: Export

Export to DBML for dbdiagram.io

DBML is the best choice if you want to keep designing and later generate SQL from the updated model.

sh
docker run \
--mount type=bind,source="$(pwd)",target=/home/schcrwlr/share \
--rm -it \
schemacrawler/schemacrawler \
/opt/schemacrawler/bin/schemacrawler.sh \
--server=sqlite \
--database=share/northwind.db \
--info-level=standard \
--command=script \
--script-language=python \
--script=dbml.py \
--output-file=share/northwind.dbml

Open dbdiagram.io, paste in the contents of northwind.dbml, and you immediately have an editable diagram based on the live database.

Export to PlantUML

PlantUML is a good choice if your team keeps diagrams in source control or already uses PlantUML in docs and architecture notes.

sh
docker run \
--mount type=bind,source="$(pwd)",target=/home/schcrwlr/share \
--rm -it \
schemacrawler/schemacrawler \
/opt/schemacrawler/bin/schemacrawler.sh \
--server=sqlite \
--database=share/northwind.db \
--info-level=standard \
--command=script \
--script-language=python \
--script=plantuml.py \
--title="Northwind Database Schema" \
--output-file=share/northwind.puml

Open northwind.puml in PlantText or your IDE and keep editing.

Export to Mermaid

Mermaid is the best choice if you want diagrams that render directly in Markdown-based tools such as GitHub, GitLab, and Notion.

sh
docker run \
--mount type=bind,source="$(pwd)",target=/home/schcrwlr/share \
--rm -it \
schemacrawler/schemacrawler \
/opt/schemacrawler/bin/schemacrawler.sh \
--server=sqlite \
--database=share/northwind.db \
--info-level=standard \
--command=script \
--script-language=python \
--script=mermaid.py \
--title="Northwind Database Schema" \
--output-file=share/northwind.mmd

Paste northwind.mmd into the Mermaid Live Editor or commit it straight into your documentation.

Export to QuickDBD

QuickDBD is a good choice when you want fast, text-first schema editing in a dedicated diagram editor.

sh
docker run \
--mount type=bind,source="$(pwd)",target=/home/schcrwlr/share \
--rm -it \
schemacrawler/schemacrawler \
/opt/schemacrawler/bin/schemacrawler.sh \
--server=sqlite \
--database=share/northwind.db \
--info-level=standard \
--command=script \
--script-language=python \
--script=quickdbd.py \
--title="Northwind Database Schema" \
--output-file=share/northwind.quickdbd

Paste northwind.quickdbd into QuickDatabaseDiagrams.com to continue editing.


Step 3: Edit

This is the part most reverse-engineering tools do not support well.

Once you have exported the live schema into an editable design language, you are no longer stuck with a read-only report. You can continue designing.

For example, imagine that after reverse-engineering northwind you want to add a table for storing playlist tags.

In DBML, you could extend the exported design with something like:

`dbml
Table PlaylistTag {
PlaylistTagId integer [pk]
PlaylistId integer [not null]
TagName varchar [not null]
}

Ref: PlaylistTag.PlaylistId > Playlist.PlaylistId
`

That is the key distinction in this workflow:

  • you start from what is actually in production
  • you bring that schema into an editable format
  • you extend the design instead of redrawing it from scratch

The same idea works with PlantUML, Mermaid, and QuickDBD. Add entities, adjust relationships, rename columns, or reorganize sections of the model for clarity. SchemaCrawler gets you to a clean starting point from a live database instead of forcing you to recreate the schema by hand.


Step 4: Generate DDL

DBML is especially useful because it can be turned back into SQL.

Install the DBML CLI:

sh
npm install -g @dbml/cli

Then generate SQL from your updated design:

sh
dbml2sql northwind.dbml --postgres

Or for MySQL:

sh
dbml2sql northwind.dbml --mysql

Now you have a full round-trip flow:

  • reverse engineer from a live database
  • edit the design in a modeling tool
  • generate SQL from the updated design

That is a much more useful workflow than producing a static HTML report and stopping there.


Worked Example: northwind from Live Database to Editable Design

Here is the full DBML flow in one sequence.

1. Export northwind to DBML

sh
docker run \
--mount type=bind,source="$(pwd)",target=/home/schcrwlr/share \
--rm -it \
schemacrawler/schemacrawler \
/opt/schemacrawler/bin/schemacrawler.sh \
--server=sqlite \
--database=share/northwind.db \
--info-level=standard \
--command=script \
--script-language=python \
--script=dbml.py \
--output-file=share/northwind.dbml

2. Open the result in dbdiagram.io

Paste the contents of northwind.dbml into dbdiagram.io.

3. Extend the model

Add new tables, fields, and relationships directly in DBML.

4. Generate SQL

sh
dbml2sql northwind.dbml --postgres

At that point you have gone from a real database to an editable design and back into SQL without manually redrawing anything.


When to Choose Each Output Format

  • Choose DBML if you want the strongest design-tool workflow and the option to generate SQL later.
  • Choose PlantUML if your team prefers text-based diagrams in source control or already uses PlantUML in architecture docs.
  • Choose Mermaid if you want diagrams that live directly inside Markdown, GitHub, GitLab, or internal docs.
  • Choose QuickDBD if you want rapid text-based editing in the QuickDatabaseDiagrams editor and an easy way to iterate on schema shape.

You do not need to choose only one forever. The same database can be exported to all four, depending on what the next step in your workflow looks like.


Why This Matters

Reverse engineering is only half the job.

Developers often inherit an existing database and need to answer more than "what tables are there?" They need to ask:

  • what should we add next?
  • how do we model the next feature without breaking what exists?
  • how do we propose changes in a format that is easy to review?
  • how do we get from the current schema to future DDL with less manual work?

SchemaCrawler helps because it starts with the live database and produces output you can keep working with.

That is the real value of DBML, PlantUML, Mermaid, and QuickDBD export. Not just nicer diagrams, but a better workflow.


Try It Yourself

Start with the northwind sample database and generate one of the editable formats above. Once you have the workflow working locally, switch the connection to PostgreSQL, MySQL, SQL Server, Oracle, DB2, or any other JDBC database supported by SchemaCrawler.

If you want to customize the generated output, you can find and edit the built-in scripts: