Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EER in MySQL workbench

I have a question in MySQL workbench.

How can I make a relation 1 to 0..1 represented visually?

I only found this symbol:

like image 723
user455318 Avatar asked Feb 24 '23 08:02

user455318


1 Answers

This isn't obvious, but to make a 1:1 into a 1:0-1 you have to change the 'mandatory' checkbox in the relationship editor.

First, click on the 1:1 tool, then click on the column in the table you wish to be on the '0' side of the relationship, followed by the column on the '1' side. Now, double-click the connector line, and in the editor window under the 'foreign key' tab, uncheck the 'mandatory' checkbox on the '0' side of the relationship. The symbol on the diagram should change appropriately.

Hope that helps.

like image 147
boatingcow Avatar answered Feb 26 '23 20:02

boatingcow