Hacker News new | ask | show | jobs
by chunkyks 1907 days ago
I implemented a DB visualisation tool like this for sqlite3, also using graphviz. It's called, unimaginatively, sqlite3todot [1]

The couple tricks it has that I really like are a) it shows the table itself [which isn't uncommon], but also b) has the ability to group up tables, which for me turns out to be a devastatingly killer feature that no other tool has.

When I'm working on a schema [especially one I've not seen before], one of the things that drives me insane is not being able to say "these six go together. Group them". Then you can simply look at arrows that enter or leave that grouping for your next exploration step. By the time I'm done, anything not-categorised stands out [it's simply in the space between groups]; any boxes that have an excess of arrows between them can mean my mental model is wrong [or the schema has some nonoptimalities].

There's an example here; it only has two groupings ["input" and "output"], but it immediately gets the point across: https://icculus.org/~chunky/stuff/sqlite3_example/sqlitesche...

[1] https://github.com/chunky/sqlite3todot

2 comments

Not sure I would have made mine if I had come across yours first.

https://github.com/TomConlin/SQLiteViz

wondering finished. Thx!
I doubt it is "finished" in that it has only been asked to parse a case or two and if it broke I would have to choose between extending it or just trying the GPs implementation.
I wonder if there's something like this operating on the DDL statements file. Anybody?
Just the ddl? Just execute it into a temporary database.
possible, yes. I'd prefer without the SQLite dependency, however.

But not parsing SQL is a pro, indeed.

As dependencies go, sqlite isn't a biggie, that's one of its best features