Skip to content

Generate and visualize database table relationships as an ER diagram. This Go application connects to local PostgreSQL databases, extracts table structures and foreign key relationships, and outputs an ER diagram based off them.

Notifications You must be signed in to change notification settings

gehrkev/go-table-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-table-graph

Overview

go-table-graph is a web application written in Go that allows you to visualize database table relationships as an Entity-Relationship (ER) diagram. It connects to local PostgreSQL databases, extracts table structures, and renders the ER diagram using the vis-network JavaScript library for interactive visualization.

Requirements

  • Go: Ensure that you have Go installed on your system. You can download it from go.dev.

  • PostgreSQL Database: You need access to a local PostgreSQL database to connect to and extract table relationships.

Installation and Setup

Clone the Repository

git clone https://github.com/gehrkev/go-table-graph.git
cd go-table-graph

Build and Run

  1. Build the executable:

    go build -o go-table-graph
  2. Run the application:

    ./go-table-graph
  3. Open your web browser and go to http://localhost:8080 to access the application.

Usage

  1. Enter your PostgreSQL database username, password and database name in the input fields.
  2. Click on Generate ER Diagram to fetch and visualize the database schema.

External Libraries Used

  • gin: Gin is a HTTP web framework written in Go (Golang).
  • pq: Pure Go Postgres driver for database/sql.
  • vis-network: 💫 Display dynamic, automatically organised, customizable network views.

About

Generate and visualize database table relationships as an ER diagram. This Go application connects to local PostgreSQL databases, extracts table structures and foreign key relationships, and outputs an ER diagram based off them.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published