To create a relationship in MySQL Workbench:
- Create a database model (either create a new model or reverse engineer an existing database)
- Viewing the database model, double click on the first table of the relationship
- The bottom pane will open with the table details. Click on the Foreign Keys tab
- In the left pane, select the foreign key field and referenced table
- In the middle pane, select the foreign column and referenced (primary key) column
- In the right pane, set any Update/Delete actions you’d like to occur when a primary key record is updated or deleted
The relationship is now established. Repeat steps 4 to 6 for any other foreign key columns in that table.