Search code examples
mysqlforeign-keysmysql-workbenchcardinality

Difference between "One and only one" and "Zero or one" (in MySQL Workbench)


I have tables Employees and Project.

Project table have ProjectCreator and ProjectManager fields, which both references Employees.EmployeeID.

I added the foreign keys exactly the same in MySQL Workbench, however, they show up differently in the diagram:

-|O------E [ProjectCreator]

-||-------E [ProjectManager]

Anyone know why this happened? Both fields have 0 as the default value.


Solution

  • Issue was with MySQL Benchmark. It didn't draw the diagram correctly until I restarted the application.