Readit News logoReadit News
shizcakes · 2 years ago
We've been using https://dbdiagram.io/, which also has an open-source markup language: https://github.com/holistics/dbml
swyx · 2 years ago
ive been a keeping a list of other diagramming tools too https://github.com/swyxio/spark-joy/blob/master/README.md#di...
huydotnet · 2 years ago
would you mind checking https://chatuml.com out to see if it fits your list?
breadwinner · 2 years ago
Add Airforms since it has an automatic database diagram display: https://airforms.com
chrisweekly · 2 years ago
Dude you have all the lists.
tempest_ · 2 years ago
I like the markup language and the app looks nice but I just can't comfortably dump database schemas into random web apps.
grouseway · 2 years ago
I see the other comment is marked dead now, but seriously why? I'm having a hard time imagining how a schema is viewed as actual intellectual property or a security risk.

Dead Comment

bdcravens · 2 years ago
I've used DBML and like it as well. There's a small ecosystem of tools that support it, and I think the additional structure with curly brackets makes for fast "eye parsing".
npack · 2 years ago
dbdiagram is definitely an useful utility. Some of the differentiators would be: 1. Simpler Syntax 2. Fully Local processing (This tool works offline, once you load the original web page) 3. Light weight & fast (the entire project is 20kb in size)
Fiahil · 2 years ago
Every engineer I know have been using DBML for a while. Did they fail their market research ?

Edit: Damn, it really look like they were copying dbdiagram.io, down to the FK relationship syntax. Not cool.

bdcravens · 2 years ago
It does look VERY similar, but I think they tried to make the language a bit more terse. As a said is another comment, I think the slightly additional structure is actually better.
sbuttgereit · 2 years ago
From what I can tell, a lot of these tools seem OK for capturing relatively simple database designs, but at least "look" fairly inadequate for more robust needs. This makes sense if you're trying to use a GUI for creating a database: there's going to be limits to how much you can accomplish easily with that approach so being robust for smaller databases works out.

Most of the time I want an ERD tool it's to capture a database that I've already built for documentation purposes, or to document a database that someone else has built and that I need to come to terms with.

For this I use SchemaSpy (https://schemaspy.org/). I let it reverse engineer the database, build the diagrams, etc. I like the way it organizes what it captures and that it will do things like capture in-database object comments and put them in sensible places; for example, this lets me use the PostgreSQL COMMENT ON * commands to add contextually relevant documentation in the DDL and this tool will do the right thing when I generate database documentation.

tejtm · 2 years ago
I used SchemaSpy to great effect for many years, till someone decided it was abandoned and took it over. When I tried again it had become shockingly bloated presumably in the name of modernity. I just wrote a one pager for the SQL dialect I was in and moved on. I get that it is java, and bloating is considered normal but as the original author proved, it does not have to be that way all the time.
sbuttgereit · 2 years ago
This could well be the case, but to be honest I'm not too concerned by that. So in short, it may not be a well engineered product, but it seems to do its job well enough which is all I really care about as a user.

My usage pattern is to run it on a workstation (usually my personal workstation or laptop) and take the result and put it somewhere useful. It's not a perpetually running process or something I'd run on, say, a production machine where any bloat could produce meaningfully negative results. Those results are also not something I'm too worried about for things like bloated web pages or so... at least insofar as the audience for that result is fairly limited and the user experience isn't something I see as hurting usability. Any extra time it takes doing its job because of any inefficiency doesn't really impact me either; once I'm at a point I can set it running on a database, I haven't found it to be terribly long running, I don't run it often, and usually I can just do other stuff while it's running (a few minutes or so).

I haven't found anything open source that produces as good a result and its commercial competitors aren't any better in any sufficiently meaningful way... unless you want to start talking about database documentation being integrated into larger, consolidated requirements/documentation tools.

If anything I'm pleased that someone did pick up the maintenance and that new database features and the like have some hope of being supported... and without maintenance the result -would- eventually come to suffer as things in the database world moved on.

mih · 2 years ago
The issue I have with a lot of these tools is they work fine when depicting relationships between tables in the same schema (talking mainly about PostgreSQL databases), but few support showing relationships between tables across different schemas.

Also, when the number of tables grows large, few have layouts arranged in an optimal way. I use D2 (https://d2lang.com/) to create ERDs. However, of the free layout engines available in D2, Dagre (https://github.com/dagrejs/dagre) and ELK (https://github.com/eclipse/elk) both don't have optimal placement of layouts for a sufficiently complicated database.

graypegg · 2 years ago
Jetbrains has their own mermaid plugin they started working on recently, and honestly, I’ve found mermaid to be really all I need.

https://plugins.jetbrains.com/plugin/20146-mermaid/reviews

thom · 2 years ago
I've used Mermaid, partly because it integrates well in both GitHub and Notion. It's fine, quite featureful really, but the lack of any ability to control layout properly makes complex schemas quite a mess when rendered. Not sure how others of these declarative, text-based engines deal with that.
flarg · 2 years ago
Use Mermaid in draw.io. It renders Mermaid into native draw.io shapes that you can rearrange.
ElFitz · 2 years ago
Oh! I thought this was something about describing a data model in plain text and having an LLM generate the entity-relationship diagram tool.

I’ve done this with GPT4, asking it to output Mermaid relationship diagrams. And it’s usually impressively good (never went beyond ~10 entities). I also had it update and fix the result using natural language feedback.

I sometimes had to touch up a few things "by hand", but I really wouldn’t bother doing it from scratch myself anymore.

Even the failures are interesting, as they often result from an unclear description, or issues in my own understanding of the domain or model.

sunsetMurk · 2 years ago
ditto, GPT-4 is very impressive with all types of mermaid [0] diagrams! even helps w/ styling and formatting tweaks. It's helped me so much with better coverage and maintainability on diagrams for software & systems projects.

0. https://mermaid.live/

smusamashah · 2 years ago
I am somewhat maintaining a list of text to diagram tools at https://xosh.org/text-to-diagram/ (will add this one too)

These are two other dedicated tools I have on the list

https://app.quickdatabasediagrams.com/#/

https://dbdiagram.io/d

koch · 2 years ago
Thanks for maintaining this list!

Unrelatedly, could you do me a favor and update #14 https://cascade.page to https://markwhen.com? I renamed it and moved domains.

l5870uoo9y · 2 years ago
Do you know of any libraries (TS/JS) for creating database diagrams? I am considering integrating it into my app.
saadatq · 2 years ago
I love that this is trending on HN. LLMs be damned. We still have lots of “simple” problems to be solved, like how to effectively write and share an ERD.
grouseway · 2 years ago
A LLM would probably make this better. Instead of asking the user to learn a DSL why not just translate SQL to whatever structure the render functions uses?
mr_toad · 2 years ago
You don’t need an LLM for that. Also, SQL doesn’t capture all the information you might want in an ER diagram.
kapv89 · 2 years ago
Great ! I am also excited to share ERDTOOL built in this space - https://erdtool.com ... - Multiplayer entity-relationship-diagramming tool - think Figma of ERDs - Supports Postgresql and MySQL (mysql part is new homepage hasn't been updated to reflect that) Building it solo. I hope this will also interest the tech community