Search code examples
postgresqlpgadmin

Creating relationship links in PostgreSQL via pgAdmin


I created a databse with four tables in pgAdmin. It was coded in PostgreSQL.

I was wondering how do you create replationship links in pgAdmin? I've searched google and youtube, but can't seem to find a tutorial on it.

If someone can explain how to do this, i'll be grateful.

Here's a picture of how I designed my datase to relate:

relationship design


Solution

  • You can find it via right-click on the table --> Properties --> Constraints --> Foreign Key (Add).

    Then you can add the foreign keys as needed. There is (yet) no way to do it graphically.