PHPackages                             hywan/database-to-plantuml - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. hywan/database-to-plantuml

ActiveLibrary[Database &amp; ORM](/categories/database)

hywan/database-to-plantuml
==========================

Extract database table information into a PlantUML description.

1.1.0(8y ago)1957.4k↓50%22[2 issues](https://github.com/Hywan/Database-to-PlantUML/issues)[2 PRs](https://github.com/Hywan/Database-to-PlantUML/pulls)BSD-3-ClausePHPPHP &gt;=7.0

Since Jun 30Pushed 6y ago8 watchersCompare

[ Source](https://github.com/Hywan/Database-to-PlantUML)[ Packagist](https://packagist.org/packages/hywan/database-to-plantuml)[ Docs](https://github.com/Hywan/Database-to-PlantUML)[ RSS](/packages/hywan-database-to-plantuml/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (6)Used By (0)

Database to PlantUML
====================

[](#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
============

[](#installation)

With [Composer](https://getcomposer.org/), simply run the following command:

```
$ composer install
```

If you would like to use it as a dependency of your project, then:

```
$ composer require hywan/database-to-plantuml
```

To use the `plantuml` backend, you can use the JAR in `resource/plantuml.jar`.

Examples with…
==============

[](#examples-with)

… PostgreSQL
------------

[](#-postgresql)

Taking as an example the famous `employees` use case:

```
# 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://camo.githubusercontent.com/2f57c70d1d57490a413d446b4173e84d921c946b48a6586c44bd184668e8c989/68747470733a2f2f636c6475702e636f6d2f554d73506733574b68302e706e67)](https://camo.githubusercontent.com/2f57c70d1d57490a413d446b4173e84d921c946b48a6586c44bd184668e8c989/68747470733a2f2f636c6475702e636f6d2f554d73506733574b68302e706e67)

… MySQL
-------

[](#-mysql)

With the same `employees` use case:

```
# Import the schema.
$ mysql -u root  output.png
```

[![Output with MySQL](https://camo.githubusercontent.com/97033569e766841b9183068c06091694cf61552c05bcfa5217cf21014a1c92bb/68747470733a2f2f636c6475702e636f6d2f43676e37627164457a352e706e67)](https://camo.githubusercontent.com/97033569e766841b9183068c06091694cf61552c05bcfa5217cf21014a1c92bb/68747470733a2f2f636c6475702e636f6d2f43676e37627164457a352e706e67)

Note: Outputs differ because the `employees` examples are not exactly the same. They are here to illustrate the tool only.

License
=======

[](#license)

BSD-3-License, but seriously, do what ever you want!

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~22 days

Total

4

Last Release

3170d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/946104?v=4)[Ivan Enderlin](/maintainers/Hywan)[@Hywan](https://github.com/Hywan)

---

Top Contributors

[![Hywan](https://avatars.githubusercontent.com/u/946104?v=4)](https://github.com/Hywan "Hywan (32 commits)")[![allyorange](https://avatars.githubusercontent.com/u/12495952?v=4)](https://github.com/allyorange "allyorange (1 commits)")[![Headd2k](https://avatars.githubusercontent.com/u/2144150?v=4)](https://github.com/Headd2k "Headd2k (1 commits)")

---

Tags

databasemysqlplantumlpostgresqlvisualisation

### Embed Badge

![Health badge](/badges/hywan-database-to-plantuml/health.svg)

```
[![Health](https://phpackages.com/badges/hywan-database-to-plantuml/health.svg)](https://phpackages.com/packages/hywan-database-to-plantuml)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
