1
0
mirror of https://github.com/ManyakRus/image_database.git synced 2024-11-24 08:22:39 +02:00
Go to file
2024-09-12 15:22:05 +03:00
bin сделал settings.txt 2024-05-16 17:20:38 +03:00
cmd новый 2023-08-31 16:11:42 +03:00
docs сделал make mod 2024-03-15 10:50:42 +03:00
examples сделал ClearElements_from_Document() 2024-09-02 14:12:33 +03:00
internal сделал description 2024-09-12 15:22:05 +03:00
pkg/graphml сделал description 2024-09-12 15:22:05 +03:00
settings новый 2023-08-31 16:11:42 +03:00
test сделал description 2024-09-12 15:22:05 +03:00
vendor сделал make mod 2023-12-27 14:41:45 +03:00
.env_example сделал readme.rus 2023-09-14 11:42:05 +03:00
.gitignore сделал ClearElements_from_Document() 2024-05-17 14:01:08 +03:00
go.mod сделал make mod 2023-12-27 14:41:45 +03:00
go.sum сделал make mod 2023-12-27 14:41:45 +03:00
LICENSE Create LICENSE 2024-03-19 15:46:36 +03:00
Makefile сделал settings.txt 2024-05-16 17:20:38 +03:00
README.md сделал settings.txt 2024-05-16 17:20:38 +03:00
readme.rus сделал ClearElements_from_Document() 2024-05-17 14:01:08 +03:00

Applications for automatically creating a schema for tables and columns in a Postgres database (ERD-diagram)

There are many different applications for automatically creating ERD diagrams, however, they all display link arrows only to the table, and not to the desired column, and do not have the ability to edit and update the edited diagram - so I had to create my own application.

The application can automatically find in database and draw:

  1. All tables
  2. All table columns and types
  3. Arrows of table relationships from column to column (foreign key)
  4. Finds tables in the old existing .graphml file, and places the tables at the same X,Y coordinates

The resulting .graphml file in the free yED editor can be:

  1. Export as a .jpg drawing
  2. Edit
  3. Automatic placement of blocks

A sample implementation (drawings) can be found in the examples directory

Installation procedure:

  1. Install the .graphml file editor yEd (free) https://www.yworks.com/products/yed/download

  2. Compile this repository

make build

the image_database file will appear in the bin folder

  1. fill parameters in "settings.txt" (or ".env") file:
FILENAME_GRAPHML=
INCLUDE_TABLES=
EXCLUDE_TABLES=

DB_HOST=
DB_NAME=
DB_SCHEME=
DB_PORT=
DB_USER=
DB_PASSWORD=

Run file:

image_database

  1. Open the resulting .graphml file in the yEd editor (all elements will first be in the center of the screen) and select from the menu: Tools - Remove Node Overlaps
  • the yEd editor will arrange all the elements of the diagram in the optimal form.
  1. Export the diagram to an image. Select from the menu: File - Export

database

Source code in Golang language. Tested on Linux Ubuntu Readme from 09/14/2023

Made by Alexander Nikitin https://github.com/ManyakRus/image_database