If you want to check out the app you can go to https://drawdb.vercel.app/ .
Thank you:)
Mermaid is good for flowcharts, but we still lack reasonably good one for BPMN and enterprise diagrams. (BPMN.io is great but lacks its own lang)
I spend far too much time either:
- working in a visual designer that slows me down
Or
- fighting the layout engine of a markup language and image compiler with lots of directives to try to get the diagram to lay out anywhere close to reasonably.
The most valuable information, to me, is the table schema and the collection of relationships. Toward this end, I use a markdown table of three columns, (Field, Type, Attributes) and a code block with my own shorthand per below:
Table[field] -1:N- Table2[field2]
Detail[HeaderId] -N:1- Header[Id]
All text, no generated pictures. If I need to generate from DDL, that's pretty straightforward. But I can also mock up new designs at typing speed.Diffs are incredibly readable.
If I need to make pictures for someone else, I iterate design in a markdown file and then once it's good I will spend the time required to make a picture based off the text.
I must admit, I start to question why the pictures are necessary.
1) you do a brainstorming. doing it the visual way is much slower than the markup way. personally done it dozens if not hundreds of times with seq.diagrams. actually started donating to this guy who created sequencediagram.org, he saved me hours
2) you need to communicate chunks of the design with non-technical personnel such as business analysts and folks who have no clue about normal forms, outer joins, relational or hybrid designs, etc. they understand much better with visual assistance, which is in essence - suggestopedic approach (https://en.wikipedia.org/wiki/Suggestopedia). and you know what - they never admit their lack of fundamental knowledge, which is even worse than not explaining the matter at all. bpmn and seq.diagrams work very well here, and of course - all 1910s flowchars should be forbidden.
3) when there's a large volume of intertwined entities. you just can't convince me that a graph is better represented as series of relational-algebra-alike texts, and not a planar image of it. try to imagine what the Northwind educational DB looks like as text ... and how you teach/explain to s.o. to walk it.
https://support.microsoft.com/en-us/office/northwind-databas...
I think I agree. My habit is to keep DDL in version control, one file per database object. If I'm interested in a table, column, or its relationships, I can grep for names, look at the files and see the datatypes, foreign keys, etc.
I can also by grepping find any stored procedure or function that references a table or column because the code for those is in version control also.
I've tried diagrams and while they are convenient at a fairly high level they can't really show you everything and become unweildy if they try. I've found them of such limited benefit that I just work with text/code. I might make a simple diagram if I have to present/talk about a change.
I want something that will use (text based, tree-sitter diffable, and git stored) architecture diagrams as its source of truth. Then compare those diagrams with actual code, and give us meaningful/useful divergence metrics. And from the source of truth, apply style transforms to display in different ways. D2 can do something like that last bit, with its different layout engines.
It feels like we already have the information available: we have (terraform) code that produces infrastructure, and (nodejs) code that produces applications. So how can take that structural information and turn it into something useful? I kind of like the idea of a ML model that gives you some standard views of your diagrams, then asks you which bits are useful, and which bits you want to hide/discard from the final output. Going back and forth with that a bit would produce a JSON file that tells the transform engine what to display. I don't know if an LLM can be prompted to do something like that, but a model-assisted workflow might be useful.
I also want to be able to compare before and after architectural decisions. Or compare the infrastructure and application patterns against industry best practices. Plus being able to automatically spit out updated, accurate diagrams for leadership would be great.
https://databasediagram.com/app
and
https://app.quickdatabasediagrams.com/
are better alternatives, at least in that these won't ask login.
[0]: https://dbdiagram.io/docs/release-notes/2024-03-adjustable-r...
I want Javadoc with scoped diagrams for relational databases.
1 - https://mail.openjdk.org/pipermail/javadoc-dev/2023-January/...
One thing that may be me getting my brain reversed, but when you set the "cardinality" of a relationship the "1" and "n" markings on the connecting line seem to be reversed?
Clean for sure.
First feedback I have is, when you click "Settings" > "Flush Storage" there is no "Hey this button will delete everything you have been working on are you sure you want to do this?" type message to confirm if someone wants to actually flush the storage.
I was about 6 or 7 tables deep messing around with it and was looking at settings and kind of absent mindedly clicked that without thinking and everything was gone :D
Other feedback is that it would be nice to be able to set it to say "I want to design a database in PostgreSQL" and have the available datatypes match that. So I can specify postgres specific things like time with timezone, money, point (for geo data) etc.
How do you prefer feedback? Issues in the GH repo?
If we want people to actually use ER diagrams, treating the original version from 50 years ago as the only valid way to write them doesn't seem useful. Both science and engineering are about iterative improvement after all.
drawio.com brands itself as "draw.io" but uses .com.
OP, why is it "drawdb-io"?
Cool project btw :)
Would be even better if it lived in VSCode, auto-syncing with my DDL files...
Any updates on PostgreSQL import support?
- Let me pick a database when I start so the data types are restricted to that particular database. This can help down the line with other quirks and particularities of each db.
- I'd love to be able to use this and convert it to a model for my ORM (I'm currently using Prisma, but depending on your vision this could expand to other languages and ORMs such as, for example, Django). This would be helpful because I'd be able to jump from design to implementation without rewriting everything as models in my ORM.
- The nodes to establish relationships are difficult to click, and several times I ended up dragging the table instead. Consider making them easier to grab.
- If I delete a property from the table (in the grid) there's no quick way to undo. A toast message with an undo link would be helpful.
- The "delete diagram" option didn't ask me for confirmation and even if I saved my diagram before, it's gone. And this option is dangerously close to "Rename"!