Download the PHP package chippyash/db-plantuml without Composer

On this page you can find all versions of the php package chippyash/db-plantuml. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package db-plantuml

PlantUML Database Support

chippyash/db-plantuml

What

  1. Provides Plantuml !include files that you can use to create logical and physical database diagrams
  2. Provides a (PHP) utility to turn the diagrams into DDL files to create your database.

PlantUml Support

2 definition files

Goal

To quickly create logical db designs that end users might understand and convert them to initial physical designs with additional functionality that can be turned into something developers will understand, i.e. a SQL Schema

Demo

Look at both files. The only difference between them is

The original logical definition was copy-pasta'd from the logical file to the physical file and renders automatically in physical form.

Take a look at the dist\*.iuml files. It's the subtle differences between the function declations that allows the transform to happen.

Installation

There is no real need to install this code base. You can access the required files remotely using the !includeurl directive.

You do however, need to install PlantUml!

Usage

  1. Create your logical model to represent customer/user view
  2. Copy logical model file to physical model file and change the !include statement. Amend as necessary.
  3. (Optional) Generate the SQL DDL file to create your database

Logical Models

!include ../dist/DatabaseLogical.iuml

or

!includeurl https://raw.githubusercontent.com/chippyash/db-plantuml/master/dist/DatabaseLogical.iuml

Logical model will display the following differently to their representation in a Physical model

Components
Data types

NB string and int lengths do not display in logical models, but specify them if you know them as they will be displayed in physical models.

You can display other data types directly in your entity classes e.g.

Type modifiers
Indexes and keys
Relationships

There is an internal relationship _join

You can use this to fine tune relationships as required. fNum & tNum accept an integer or 'n'.

Physicals Models

!include ../dist/DatabasePhysical.iuml

or

!includeurl https://raw.githubusercontent.com/chippyash/db-plantuml/master/dist/DatabasePhysical.iuml

Use the same statements as per Logical models. In addition there are:

Components
Indexes and keys

Foreign keys are automatically generated where appropriate between Tables in your model. You may need to explicitly declare them for Tables that are off model.

Relationships

These uses relationships is purely informational.

User defined data types

Whilst many SQL RDMS natively support user defined data types, many do not, including the ever popular MySql/MariaDb. You can achieve this functionality in PlantUml yourself.

and then use them in your Table definitions:

See (PlantUml Preprocessing)[https://plantuml.com/preprocessing] for more ideas.

Diagram to SQL conversion

A PHP utility CLI program that will convert your physical diagram to SQL DDL.

MySql is supported at this release.

Basic usage

bin/pumldbconv g ./examples/User-Physical.puml ./out.sql

Which will convert the example physical diagram into SQL looking thus:

The program assumes that your plantuml.jar is located at:

If this is not the case, you can specify the folder location with the -p flag e.g.: bin/pumldbconv g -p /usr/local/javajars ./examples/User-Physical.puml ./out.sql

Installation - production use

You will need PHP8.0+ with the xsl and xml extensions installed to use this program.

Installation - development

Caveat: These instructions assume a Linux OS. (If you are a Windows/Mac user, please consider adding installation and usage instructions to this repo by way of a pull request.)

PHP normally has the XML extension built-in, but you may need to install it manually.

Building

Will build a new PHAR executable in the bin directory. You will need Box installed and your php.ini settings modified to build phar files (off by default).

Changing the library

  1. fork it
  2. write the test
  3. amend it
  4. do a pull request

Found a bug you can't figure out?

  1. fork it
  2. write the test
  3. do a pull request

NB. Make sure you rebase to HEAD before your pull request

Or log an issue ticket in Github.

Where?

The library is hosted at Github. It is available at Packagist.org

License

This software is licensed under the BSD-3 Clause license.

History

V0.0.0 Initial alpha release

V0.0.1 Alpha release with DDL generator

V1.0.0 Upgrade to use PHP 8 and latest version of PlantUML

V1.1.0 Add UNSIGNED attribute support


All versions of db-plantuml with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-dom Version *
ext-xsl Version *
symfony/console Version ^5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chippyash/db-plantuml contains the following files

Loading the files please wait ....