Skip to content

Creates simple diagrams in DOT, PNG and SVG from SQLite database files.

License

Notifications You must be signed in to change notification settings

n0x1m/sqliteviz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQLiteViz

Go application that creates simple diagrams in .dot, .png or .svg from your SQLite database schemas using Graphviz.

Installation:

go install github.com/n0x1m/sqliteviz@latest

Usage, provided graphviz is installed:

Usage of ./sqliteviz:
  -db string
        sqlite database path
  -ignore value
        tables to ignore
  -out string
        output file to write to write to
  -template string
        template file to use (default "diagram.tpl.dot")

Examples

# to dotfile
sqliteviz db.sqlite3 > output.dot
# to png
sqliteviz db.sqlite3 | dot -Tpng > output.png
# to svg
sqliteviz db.sqlite3 | dot -Tsvg > output.svg
# using flags and with ignore list
sqliteviz -db db.sqlite3 -ignore schema_migrations,sqlite_stat1 > output.dot

Example

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

sqlite visualization of the chinook database

See the corresponding Graphviz dot file that was generated.

About

Creates simple diagrams in DOT, PNG and SVG from SQLite database files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages