Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I like Mermaid fine, but nothing is perfect. I will look at your list. The tool I always wanted would let me paste in the SQL of my database schema and output a diagram of the tables and relationships. That's SQL and not Markdown or JSON or any other format.

Note that DrawDB (www.drawdb.app) does this, although it does not yet handle views. But I have been happy with what it offers so far. Still, I would welcome suggestions of other tools.



Check out dbdiagram.io though I don’t know if it handles views either, I never tried.


If it's sqlite compatible, then there a many solutions. In general it's trickier.

plug: https://github.com/dgoffredo/sqliteviz

Not web based, though.


This is based on graphviz, and with the available layout algorithms, any schema with more than 5 tables and a few foreign key relation becomes a jumbled, unreadable mess.


Here's one with 16 tables: <https://raw.githubusercontent.com/dgoffredo/sqliteviz/refs/h...>.

Not the prettiest, but workable.

I wouldn't try it on 100 tables.


Since you asked for recommendations: Cacoo (https://nulab.com/cacoo/) has this function. You input your database schema SQL and it generates an editable diagram with all the relationships.

Disclaimer: I work for them. I’m the person who developed that feature.

Feedback welcome!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: