With reference to the last part of answer given here:
What's the difference between identifying and non-identifying relationships?
A non-identifying relationship can be
optional or mandatory, which means the
foreign key column allows NULL or
disallows NULL, respectively.
I am creating a non-identifying relationship in MySQL Workbench and whether I keep foreign key column MANDATORY or NON-MANDATORY, has no effect. Even if it is NON-MANDATORY I can’t enter NULL values in it. I have to explicitly choose that particular foreign key as allowing NULL and only then I am able to store NULL values.
So I want to ask if this is the correct behaviour or this is a problem with MySQL Workbench or MySQL?
Thanks
G’day,
Answer: Bugs in MySQL Workbench.
Solution: The workbench appears to get confused at times, I have noticed I need to firstly delete any existing relationships, and then manually remove artifacts left in the table from the relationship. Then re-create the relationship.
For a non-identifying relationship, workbench should indicate whether it is mandatory by a filled pink diamond icon (or not mandatory by an unfilled pink diamond). For an identifying relationship, you should be seeing a key to indicate a primary key.
I’m not complaining about bugs in the community edition though! the workbench software gets a 10/10 from me. If on the other hand you are running the standard edition, then contact MySQL.
(I’m running MySQL Workbench v5.2.34 CE, Rev 7780.)
Cheers