سؤال

I have a question in MySQL workbench.

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

I only found this symbol:

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top