nox.im · All Projects · All in Go

sqliteviz

Simple Go application that creates ERD diagrams in DOT, PNG and SVG from SQLite database files using a dot template for Graphviz. Find the sqliteviz source code on Github. If you have the go tool chain installed, you can install and try gmifs with:

go install github.com/n0x1m/sqliteviz@latest

Simple relationships are shown with edges and composite indices and unique indices are added at the bottom of the attribute list. Color coding can be controlled via the template file:

Chinook is a sample database available for SQLite and other databases. It’s an alternative to the Northwind database and is meant for demos and testing ORM tools. It can be created by running a single SQL script. The following sample was generated against Chinook with:

sqliteviz -db chinook.db -ignore schema_migrations,sqlite_stat1 > example/chinook.dot
sqliteviz -db chinook.db -ignore schema_migrations,sqlite_stat1 | dot -Tsvg > example/chinook.svg

Chinook database visualized with sqliteviz

See the corresponding Graphviz dot file that was generated.


Last modified on Monday, Apr 11, 2022.
Go back