This is structure of two existing tables:
Table: Location
-------------------------
PK varchar | Symbol
PK int | LocationID
FK int | Shop
- varchar | Address
Information:
Composite key of: Symbol and LocationID
Foreign key to Shop's table: Shop
Table: Shop
-------------------------
PK varchar | Symbol
PK int | ShopID
timestamp | SomeDate
Information:
Composite key of: Symbol and ShopID
This is how i can join both tables:
SELECT * FROM Location As location
INNER JOIN Shop As shop
ON location.Shop = Shop.ShopID AND location.Symbol = Shop.Symbol
However in Postgres I need to make relation between those tables. In DbEaver in the ER diagram there is no graphical possibility to draw relationship.
What is the command to create such relationship?
CREATE TABLEstatements are usually a lot better if you want to show us the structure of your table. Your "format" is highly unusual - aCREATE TABLEstatement would be much easier to understand