dbml
dbml copied to clipboard
alternative visualization of DBML scripts?
DBML seems to be an interesting and easy way to describe data models. However, it seems to me that currently it is still a one-way street towards DBML in terms of visualization: it is very easy to describe a database or a model in DBML, but the only visualization possibility seems to be dbdiagram.io. But the possibilities of dbdiagram.io are very limited, and especially for larger databases with hundreds of tables and thousands of columns it is rather not suitable (yet). For that it would be necessary that the autolayout arranges the objects in a meaningful way, you can filter etc.
I have seen some tools that can create DBML scripts (This is how I learned about DBML). But are there alternative ways of visualizing DBML scripts, then dbdiagram.io?
I'm not aware of any at the moment @aisbergde. But I'm curious- which are the current limitations of dbdiagram in visualizing tables that you see?
@nvquanghuy it is very hard to work with big databases containing several hundred tables:
- missing search
- missing association from script to diagram (I can jump from diagram to script but not from script to the table in the diagram)
- the zoom limit is 25%, it is not possible to get it smaller to see an overview of all tables
- main issue: the automatic placement of objects is not very useful. It doesn't use the relationships to make some useful arrangement. It is very hard to see which objects are related
These are great feedback @aisbergde, appreciate it. We've taken notes of these to work on. Some of these can be done fairly quickly (search, association, zoom limit), the smart arrangement might take some work to get it right.
Thanks a lot for the feedback. I'll share more update once we get any of them implemented.
@nvquanghuy I would like to give more feedback. What is the preferred place for you developers? The forum or GitHub?
My first idea was to use https://community.dbdiagram.io/ for questions, feedback and feature requests, and I was able to post some entries. But there is a kind of "spam protection" and I got the message I need to wait 22 h to write new articles. At this point I stopped using the forum because I don't always want to wait 24 h before posting new articles there. Then I tried here on Github, because so far no "intelligent logic" has forbidden me to write there.
If you have admin rights in the forum, then maybe you can soften this spam protection. It's otherwise frustrating when you've already written an article and then can't post it.
Thank you @aisbergde. As dbdiagram as dbml are 2 related but separate projects, the proper place to feedback for dbml syntax is Github, and for dbdiagram is the forum.
Thank you for pointing out the spam protection issue with the forum. I checked out and tried to play around with some settings. Hopefully the protection is more relaxed now.
I find DBML to be a really clean syntax, and the visualization over at dbdiagram.io looks sweet. I'd like to use DBML as part of our model documentation, that we write in mkdocs.
Would is be possible to have a javascript library that can take in dbml and outputs a plot? Similar to what mermaid.js is doing.. basically diagrams-as-code. Mermaid can be used within mkdocs (link) using a plugin. I'd be happy to contribute a mkdocs plugin for dbml and help promote it!
@timvink one alternative I found was https://github.com/softwaretechnik-berlin/dbml-renderer but it doesn't work with my dbml scripts containing multiline notes. I also tried this: https://dbdocs.io/ (which is from the same people creating dbml and dbdiagram.io) but it also doesn't work with my scripts because it doesn't (yet) support the syntax for composed keys. But the idea and the examples are fine. I hope they will fix the bugs and I could try dbdocs.io
@timvink yes it's possible. It's something we've been thinking about. We also want it to integrate with Markdown as well (so write markdown and generate PNG/SVG as part of the doc).
Unfortunately we haven't had the resources to look properly into it yet, as we're focusing more on dbdocs.io, and also a bit short on manpower at the moment. But hopefully the situation improves in 1-2 months.
@aisbergde noted on the composed keys too.
Nice! In the meantime, I'll look into dmbl-renderer
and see if I can integrate it into mkdocs.