Show HN: Private, text to entity-relationship diagram tool
databasediagram.com
databasediagram.com
on a more serious note, everyone should have a little utility belt of lists, hand curated and intimately known. they are an extension of me at this point.
Security: well, see above—knowing what data is stored determines your value as a target.
Now is it the _best_ way to target an adversary? Probably not.
Edit: Damn, it really look like they were copying dbdiagram.io, down to the FK relationship syntax. Not cool.
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.
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.
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.
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.
These are two other dedicated tools I have on the list
Unrelatedly, could you do me a favor and update #14 https://cascade.page to https://markwhen.com? I renamed it and moved domains.
it works! but dies a little with many tables :-)
code: https://paste.rs/1ZHp7.py3
screenshot: https://i.imgur.com/4D2hEWc.png
Long term, we would want to build robust "Import" wizard for every dbms
Moreover, since there are relatively few possible grid positions, automatically rearranging the layout becomes an assignment problem, which can be solved by a simple b&b algorithm.
Obviously, this wouldn't scale, but this is just a teaching tool that I use to present small ERDs to my students.
You may test it at https://mocodo.net. Click the turning arrows symbol to draw the diagram and the shuffle symbol to rearrange it randomly.
Warning: French-flavored ERD, aka Merise MCD.
This is the friggin' holy grail of all diagramming and modeling tools. And it is available and working now. Everything else is just too primitive !
Many of these online tools reasonably rely on human input to place tables/nodes. Do any of these recommended tools do a decent job of smartly laying out the final diagram?
https://stackblitz.com/edit/web-platform-hxc9oz?file=index.h...
Is there a solution that has direct, bi-directional integration with Postgres/MySQL. For example, execute DDL from the diagram or point to an existing db and output the diagram text?
Are there any Terraform-like declarative tools for your schemas that will do a diff and generate a change script?
I've seen liquibase and it's just a series of migrations which I think is pretty gross.
I really like MS's SSDT tools, but the DACPAC workflow is pretty heavy to operationalize, though doable.
It's mostly part of a JS/TS ORM, but it uses a declarative schema language, and there are libraries in other languages to parse and process it. E.g. https://prisma-client-py.readthedocs.io/en/stable/
2. You should really work on error handling. I went to /app and tried changing the name of the CustomerID column, and nothing happened. I tried changing something else and it didn’t work either. It should tell me that the other table is mentioning a non-existent column and the input is invalid.
2. I tested it out. When i attempt to change CustomerID it does show a error toast in the bottom saying FK reference is invalid. Not sure, why its not showing up for you. Which browser are you using ?
Check it out at https://app.erdlab.io/designer/new
Has a lot more cool features for better visual representation like color tagging and search.
I also like the ability to create tables/notes using the canvas even though it has DDL support.
But, if this is looking to be a big moneymaker? eh, nah.
Everyone launching a beta version of their product says its free. You invest time learning and migrating things over and by the time they catch up on features, pricing page shows up.
I have been using https://www.erdlab.io for 6 months now and so far it looks like they are true to their word. The developers on ERDLab have fulltime jobs and treat it as a side project but still push out updates and handle maintenance in a timely manner. I want them to succeed but not so much where they start to think about making money lol
I have been using this tool just for myself for the last few months. The project is intentionally built for longevity (striving to keep the project for decades, if there are serious users). The costs to run are negligible, and I haven't thought much about monetizing. At this point, evaluating if there is enough interest in the tool
0. https://mermaid.js.org/syntax/entityRelationshipDiagram.html
Great idea for helping teams communicate.
We will have "import" functionality available soon. You should be able to convert database specific DDLs into diagram language.
it is surprisingly easy to use and most of my ideas never come up when i'm on my pc anyway.
https://grapher.baselines.cloud/
hit me up on linkedin: /in/thenatefisher
Each complained "{"detail":"AttributeError(\"'str' object has no attribute 'copy'\")","error":"PERM_SRV_ERR"}"
I crank out short catchy brand names and domain names at far greater efficacy now, steers my thoughts really well if I’m not outright taking the first suggestion verbatim
Looks like it's capable of turning a diagram to SQL too? That's neat!
For those that are interested in an GPT-powered tool, we have a project that can generate diagrams from code of any language or natural language: https://eraser.io/diagramgpt