10/13/2013

Visio: Fix Relationship from "0 to 0 or more" / Grayed out "Child has parent" option

I'm taking a class on Visio, and the instructor had us install Visio 2010. I think there's a bug in the software with the relationships. Maybe it's on purpose, but it makes no sense to me.

After dragging entities onto the layout area of Visio, you would go to the Properties section to define the name of the table, and then define the column / attribute names and types. You then pick the Primary Key for your new table. And finally, you draw Relationship lines between the tables, putting the side with the dot on the child table and the side with out the dot on the parent table.

Okay, great ... except you might get this weird Zero icon on the parent side when you want it to indicate a One. I've Googled for an answer to this, and played with the settings many times. This is the best solution I can come up with:

After you've established the Relationship:
  • Click on the Relationship line to highlight it. 
  • Look for the Properties menu. It should appear at the bottom.
  • Click on Miscellaneous.
  • The default settings are probably (Cardinality: Zero or more), and (Relationship Type: Non-identifying).
  • Below that it may say (Child has parent) with the check box on, but greyed out. You cannot click on this box.
  • Under Relationship Type, change the setting to Identifying.
  • You will see the dashed line turn solid, and the Primary Key may change to 2 column names instead of one. Stay here.
  • Now, click back on Relationship Type to change it back to Non-Identifying.
  • The Parent-to-child relationshp is now 1 to 0 or more. The Zero icon should be replaced by a One on the line itself, and the "Child has parent" option should no longer be checked.

1 comment :

  1. This comment has been removed by a blog administrator.

    ReplyDelete