I am green been software engineer, my team lead give me a task in PostgreSQL database, I need to determine the relationship of the all 405 tables, but the problem is the database doesn't have any documentation, the foreign keys and primary keys naming are so different for example.

In table a the primary key is userId and the foreign key is accountId and in other table foreign key is employeeId and supervisorId.

How to approach this kind of database without documentation? is there any API for PostgreSQL to show the table relation ships?

any tutorial link or document is acceptable,


You could try this or this for generating Entity Relationship Diagrams.


All the information you need is in the catalog, have a look at the tables:


However, if you want something more visual have a look at:


It will reverse engineer your schema and produce html output


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.