Giter VIP home page Giter VIP logo

sql2puml's Introduction

Description

Convert MS SQL Schema to PlantUML diagram source using Python

Usage

python sql2puml.py OPTIONS

Switch meaning
Mandatory
-d, --database database_name Name of database to get diagram for
Optional
-s, --schema schema name Name of schema within the database.
Default dbo for SQL Server. Not required for MySQL
-h, --host server name Server to connect to.
Default localhost
-p, --port port Port to connect to, default 1433
-o, --out output filename Filename to save output to.
Default is write to console
-S, --server RDBMS RDBMS to use.
Default of mssql or supply mysql
-u, --user user name User name to log in as.
Omit to use trusted authentication with SQL Server
-P, --password password Password to log in with
omit to use trusted authentication with SQL Server
-D, --driver ODBC Driver name ODBC Driver name to override in connection string
Use Get-OdbcDriver in PowerShell to get full list of drivers on your system
-z, --zerorows mode mode=
show to display empty tables as "greyed-out",
hide to omit empty tables, retaining space,
remove to omit empty tables and reclaim space

Example:

Python sql2puml.py -server localhost -port 1433 -dbname pubs -schema dbo

Output

Pubs (SQL Server)

Northwind (SQL Server)

Petshop (MySQL)

Install Issues

M1 Mac, Mac OS X

References

  1. PyODBC Cursor
  2. MySQL ODBC Driver

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.