Live data from Hacker News

Show HN: Dbdot – Golang tool to help generate Postgres schema diagrams

github.com

11–13 of 13 posts

Re: Show HN: Dbdot – Golang tool to help generate Postgres schema diagrams

#11
post #4

The diagrams in that way are problematic. When you model them as digraphs and use this layout and order them from too to bottom you get all the tables at the top that represent n:m relationships and at the bottom (at different levels) your main/independent entities. At least bottom to top would pack the independent ones to the top and those that represent many-to-many relationships at the bottom. From my work with Or…

That's a valid concern. My inspiration for writing this tool was to create schema diagrams for select tables (hence the -whitelist flag in the tool) rather than _all_ the tables. Think design review, presentation etc instead of exploring a new db. Having some way to dictate what table would be at the top vs. bottom would be nice.

My only fear with that is dbdot becomes bloated with flags and features. If customization of dot can be achieved by piping dbdot output to some other tool, I will explore that path.

Thank you for your feedback :)

Re: Show HN: Dbdot – Golang tool to help generate Postgres schema diagrams

#12
The best tool I've found for generating Postgres schema diagrams is Datagrip's diagram feature [2]. It's not without flaws and doesn't seem to get much love, but it also does a lot of things right: tables are arranged in a tree like fashion, where the most referenced tables end up on top. Right angled connectors look orderly even when 10 different tables reference one table (if we ignore the labels on the connectors). The color scheme is also quite nice if you leave datagrip in dark mode.

1: https://www.jetbrains.com/datagrip/features/

2: https://community.intersystems.com/sites/default/files/inlin...

Re: Show HN: Dbdot – Golang tool to help generate Postgres schema diagrams

#13

For high-level/quick-and-dirty designing I'm a fan of https://dbdiagram.io/

That's a cool website. I would say my usecase is really focused on picking existing n tables in a db for like a design or presentation. I would not want to handcraft tables as I don't care what the diagram looks like; all I care is that the diagram accurately reflects the schema.

I intend to stick true to my inspiration and keep dbdot focused for that usecase. Hence, I expect this tool to actually reach a completion after which I don't think I will want to add any more features.

Post reply on HN