Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hywan/database-to-plantuml
Compile PostgreSQL and MySQL table information into a PlantUML description.
https://github.com/hywan/database-to-plantuml
database mysql plantuml postgresql visualisation
Last synced: 5 days ago
JSON representation
Compile PostgreSQL and MySQL table information into a PlantUML description.
- Host: GitHub
- URL: https://github.com/hywan/database-to-plantuml
- Owner: Hywan
- Created: 2017-06-28T14:17:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-01T19:20:38.000Z (about 5 years ago)
- Last Synced: 2025-01-20T13:17:33.433Z (12 days ago)
- Topics: database, mysql, plantuml, postgresql, visualisation
- Language: PHP
- Homepage:
- Size: 5.35 MB
- Stars: 191
- Watchers: 10
- Forks: 23
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Database to PlantUML
This utility renders a graphical 2D visualisation of a database.
Currently, the only supported frontends are **PostgreSQL** and
**MySQL**. There are 2 backends: `commonmark` and `plantuml`. The
`plantuml` backend allows to generate visualisations into the
following formats:* PNG,
* SVG,
* EPS,
* PDF,
* VDX,
* XMI,
* HTML,
* TXT,
* UTXT,
* LaTeX.# Installation
With [Composer](https://getcomposer.org/), simply run the following command:
```sh
$ composer install
```If you would like to use it as a dependency of your project, then:
```sh
$ composer require hywan/database-to-plantuml
```To use the `plantuml` backend, you can use the JAR in `resource/plantuml.jar`.
# Examples with…
## … PostgreSQL
Taking as an example the famous `employees` use case:
```sh
# Import the schema.
$ psql -f resource/samples/pgsql-employees.sql postgres# Generate the visualisation.
$ bin/database-to-plantuml -d 'pgsql:dbname=employees' -u hywan -s employees | \
java -jar resource/plantuml.jar -verbose -pipe > output.png
```![Output with PostgreSQL](https://cldup.com/UMsPg3WKh0.png)
## … MySQL
With the same `employees` use case:
```sh
# Import the schema.
$ mysql -u root < resource/samples/mysql-employees.sql# Generate the visualisation.
$ bin/database-to-plantuml -d 'mysql:dbname=employees' -u root -s employees | \
java -jar resource/plantuml.jar -verbose -pipe > output.png
```![Output with MySQL](https://cldup.com/Cgn7bqdEz5.png)
Note: Outputs differ because the `employees` examples are not exactly
the same. They are here to illustrate the tool only.# License
BSD-3-License, but seriously, do what ever you want!