MySQL Workbench – Creating a One-to-One Relationship Using Existing Columns

MySQLrelational-theory

How do I create a one-to-one relationship using existing columns in MySQL Workbench?

I have an EER diagram tab open and I am selecting from the toolbar on the left hand side.

Unfortunately it seems that I can create a one-to-many or many-to-one relationship but not a one-to-one.

Best Answer

  • Right click on the relationship line
  • Select 'Edit Relationship'
  • Click on the Foreign Key tab in the Relationship Tab
  • The Cardinality of the relationship can be changed with the two radio buttons