PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Moisés Lima   PHP PostgreSQL Show Table Relationships   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Read me
Class: PHP PostgreSQL Show Table Relationships
Find relationships between PostgreSQL tables
Author: By
Last change:
Date: 1 year ago
Size: 1,316 bytes
 

Contents

Class file image Download

Postgresql Relationship Finder

Postgresql Relationship Finder is a tool for discovering and visualizing the relationships between database tables in PostgreSQL.

Table of Contents

Features

  • Discover the relationships between tables using foreign keys.
  • Easily navigate complex database schemas.
  • Optimize SQL queries by understanding data relationships.

Getting Started

#!/usr/bin/php -q
<?php

require_once 'vendor/autoload.php';

use TheMoiza\PostgresqlRelationshipFinder\RelationshipFinder;

$RelationshipFinder = new RelationshipFinder;

echo $RelationshipFinder->find(
	$tableDown = ['public' => 'users'],
	$tableTop = ['public' => 'budget'],
	$connection = [
		"DB_HOST" => "127.0.0.1",
		"DB_PORT" => "5432",
		"DB_DATABASE" => "database",
		"DB_USERNAME" => "user",
		"DB_PASSWORD" => "pass",
		"DB_SCHEMA" => "public"
	]
);

Prerequisites

Before you begin, ensure you have met the following requirements:

  • PostgreSQL installed and configured.
  • PHP for running the Postgresql Relationship Finder script.

Installation

  1. Clone this repository.
    git clone https://github.com/themoiza/postgresql-relationship-finder.git