Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2023-10-26 (11 months ago) | | Not yet rated by the users | | Total: 35 | | All time: 11,002 This week: 74 |
|
Description | | Author |
This package can find relationships between PostgreSQL tables.
It can connect to a given PostgreSQL database and perform SQL queries to find relationships between two tables.
The package returns a string that details the relationships found between tables. Innovation Award
October 2023
Number 4 |
Many software projects use relational databases like PostgreSQL to store and retrieve information used by those projects.
As the projects are developed, database schema usually evolves to store more information structures to support new features.
That database schema evolution process usually includes adding more database tables and relationships between them.
Naturally, developers remember the whole table structure of complex databases.
This package implements a tool that allows developers to remember the relations between tables of a PostgreSQL database.
This possibility helps developers to be better prepared to develop new features that involve database table relationships.
Manuel Lemos |
| |
|
|
Innovation award
Nominee: 3x |
|
Example
#!/usr/bin/php -q
<?php
require_once 'vendor/autoload.php';
use TheMoiza\PostgresqlRelationshipFinder\RelationshipFinder;
$RelationshipFinder = new RelationshipFinder;
echo $RelationshipFinder->find(
$tableDown = ['public' => 'order'],
$tableTop = ['public' => 'users'],
$connection = [
"DB_HOST" => "127.0.0.1",
"DB_PORT" => "5432",
"DB_DATABASE" => "database",
"DB_USERNAME" => "user",
"DB_PASSWORD" => "123",
"DB_SCHEMA" => "public"
]
);
|
Details
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
-
Clone this repository.
git clone https://github.com/themoiza/postgresql-relationship-finder.git
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.