4

I have a question in MySQL workbench.

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

I only found this symbol:

M.A.R.
  • 159
  • 1
  • 7
  • 14
user455318
  • 3,280
  • 12
  • 41
  • 66
  • http://dev.mysql.com/doc/workbench/en/wb-relationship-tools.html - solved – user455318 May 02 '11 at 17:05
  • maybe you should answer your question, instead of commenting and mark it as correctly answered. That would help people who get here via a search-engine… – feeela Sep 05 '11 at 09:34

1 Answers1

8

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.

boatingcow
  • 684
  • 7
  • 19