Database 2020-07-09

Tools for Automatically Generating DB Documents (ER Diagrams, etc.) - schemaspy, tbls

Exploring and reviewing open-source tools for automatically generating DB documents.

Read in: ja
Tools for Automatically Generating DB Documents (ER Diagrams, etc.) - schemaspy, tbls

Overview

When it comes to well-known tools for automatically generating DB documentation, MySQL Workbench is probably the first to come to mind. However, I looked for other good OSS options and tried a few, so I wanted to share my impressions.

Schemaspy

A Java-based tool that connects to a database and generates DB documentation in HTML format.

There is an image available on Dockerhub, so you can easily try it out.

For MySQL 5.7 (I think 5.8 should work too), you can run it like this: docker run -v "$PWD/schema:/output" --net="host" schemaspy/schemaspy:latest \ -t mysql -host {DBHOST}:{DBPORT} -db {DBNAME} -u {DBUSER} -p {DBPASSWORD}

In a MySQL 5.6 environment, you need to tweak the command a bit: docker run -v "$PWD/schema:/output" --net="host" schemaspy/schemaspy:latest -t mysql -host {DBHOST}:{DBPORT} -db {DBNAME} -u {DBUSER} -p {DBPASSWORD} -connprops useSSL\\=false -s {DBNAME}

Both can be tested easily in a one-liner.

Of course, it works with databases other than MySQL as well.

tbls

A CI-friendly DB documentation tool that generates documentation in Markdown format.

It can be installed via dep, rpm, brew, go, or docker.

The usage is straightforward, so refer to the README on GitHub.

I want to manage all documentation in Markdown, so I have adopted it for my personal application's documentation.

Impressions

References

Tags: Docker ER
Share: 𝕏 Post Facebook Hatena
✏️ View source / Discuss on GitHub
☕ Support

If you enjoy this blog, consider supporting it. Every bit helps keep it running!


Related Articles