💾 Archived View for nox.im › projects › sqliteviz captured on 2024-02-05 at 09:57:41. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-09-28)

-=-=-=-=-=-=-

sqliteviz summary:

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[1]. If you have the go tool chain installed, you can install and try gmifs with:

1: sqliteviz source code on Github

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:

- **Primary keys** are purple in the front column.

- **Foreign keys** and indices are green in the front column.

- **Nullable attributes** are blue in the rear column.

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[1]

1: Chinook database visualized with sqliteviz

See the corresponding Graphviz dot file[1] that was generated.

1: Graphviz dot file