Skip to content

npm version npm npm licence

DB2PUML

Toy Project To Generate Databse Server Entity Diagram

db2puml

DB2PUML

Generate PlantUML Entity Relationship Diagram From Database Tables

This command line utility parses the tables in Database server to generate PlantUML syntax to create diagrams of Databse tables and thier foreign key relationships.

Prerequisite

  • Dotnet 8 for build
  • Java for running plantuml
  • Graphviz
  • PlantUML.jar (auto downloaded if not found)

Example Usage

after build, change Connection string in setting.json, then you can try to generate svg with

dotnet run -- generate svg 
you can see example svg/puml output in output folder example output

Help Command

USAGE:
    db2puml.dll [OPTIONS] <COMMAND>

EXAMPLES:
    db2puml.dll list
    db2puml.dll generate svg --name mysvg
    db2puml.dll generate svg --name mysvg --output svg_output_folder
    db2puml.dll generate pdf --name mydiagrampdf
    db2puml.dll generate pdf --name mydiagrampdf --output myCustomOutputFolder

OPTIONS:
    -h, --help       Prints help information
    -v, --version    Prints version information

COMMANDS:
    config
    generate

Note

  • if you use cmd or windows based terminal emoji may not showing up, you can use chcp 65001 & cmd to see emoji (ref: https://conemu.github.io/en/UnicodeSupport.html)
  • this project forked from https://github.com/OceanAirdrop/SqlServerToPlantUML.git